Greasy Fork

Greasy Fork is available in English.

Rotten Tomatoes Link On IMDb

Adds a direct link to the corresponding Rotten Tomatoes movie description page for every IMDb movie

当前为 2015-04-19 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Rotten Tomatoes Link On IMDb
// @namespace   https://github.com/Ede123/userscripts
// @version     0.94
// @description Adds a direct link to the corresponding Rotten Tomatoes movie description page for every IMDb movie
// @icon        https://raw.githubusercontent.com/Ede123/userscripts/master/icons/Rotten_Tomatoes.png
// @author      Eduard Braun <[email protected]>
// @license     GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @include     http://www.imdb.com/title/*
// @grant       none
// ==/UserScript==

// get IMDb movie ID
var IMDbID_RegEx = /\/title\/tt(\d{7})\//;
var IMDbID = IMDbID_RegEx.exec(window.location.href)[1];
//alert(IMDbID);


// create link element to Rotten Tomatoes
RT_link = "http://www.rottentomatoes.com/alias?type=imdbid&s=" + IMDbID;
RT_icon = "http://www.rottentomatoes.com/favicon.ico";

var RT = document.createElement('span');
RT.style.cssFloat = "right";
RT.innerHTML = "<a target='_blank' href='" + RT_link + "'>" +
                   "<img src='" + RT_icon + "' width='16' height='16' style='vertical-align:bottom'/>" +
               "</a>";

//add link to IMDb movie page
var overview = document.getElementById("overview-top");
if (overview) {
    var star_box = overview.getElementsByClassName("star-box")[0];
    var star_box_rating_widget = star_box.getElementsByClassName("star-box-rating-widget")[0];
    star_box_rating_widget.appendChild(RT);
}