forked from ywzhaiqi/userscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doubanIMDb.user.js
111 lines (104 loc) · 26 KB
/
doubanIMDb.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// ==UserScript==
// @name doubanIMDb
// @namespace http://notimportant.org
// @version v1.6.2
// @include http://movie.douban.com/subject/*
// @author [email protected]
// @description 在豆瓣的电影条目下显示IMDb和烂番茄相关数据
// @grant none
// @note 2014-7-29,dirtyacc 修正烂番茄 ApiKey。http://bbs.kafan.cn/forum.php?mod=viewthread&tid=1759550
// ==/UserScript==
function imdb(){
rottenTomatoesApiKey = 'rcd445yybscz653zwhh9yksa';
var imdbnum; // IMDb 編號
$("div#info span.pl").each(function(){
if($(this).text() == 'IMDb链接:')
imdbnum = $(this).next().text();
});
if (!imdbnum)
return;
var imdbUrl = "http://imdbapi.xiuxiu.de/" + imdbnum;
var rottenUrl = "http://api.rottentomatoes.com/api/public/v1.0/movie_alias.json?" +
"type=imdb&id=" + imdbnum.slice(2) +
"&apikey=" + rottenTomatoesApiKey;
$.ajax({
type : "GET",
dataType: "json",
url :imdbUrl,
success : function(data) {
var rating = data.Rating;
var rank = data.Rank;
var rateHtml; // IMDb rating score HTML stiring
var rankHtml; // IMDb rank HTML string
if(rating && rating!=='-') { // construct IMDb score html
rateHtml ='<span>IMDb:'+rating+'</span>';
}
else {
rateHtml='';
}
if(rank) { // construct IMDb top250 tank html
rankHtml = '<b style="color:red;">'+rank+'<b>';
}
else {
rankHtml = '';
}
$("strong.rating_num").after('<div id="imdb_score" ><br>' + rateHtml + ' ' + rankHtml + '</div>');
$('#imdb_score').css({
"font-size": "14px",
"color": "green",
"line-height": "18px"
});
}
});
$.ajax({
type : "GET",
dataType: "jsonp",
url :rottenUrl,
success : function(data) {
var rottenImage;
var rottenText = "";
var rottenTextColor = "grey";
var numberRating;
if (data.error) {
numberRating = -1;
} else {
numberRating = data.ratings.critics_score;
}
if (numberRating === -1) {
rottenImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzo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ea9v1jdBv8HJBxvLjjnVq21l621D2ut79Na16SUWkq5rpRasdZeBHCNUnrXA8XfAwBGQIccYFZOzAAAAABJRU5ErkJggg==";
rottenText = "N/A"
} else if (numberRating >= 60) { // if the movie is fresh
rottenImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwK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y/w/sTGv3QwC8BgBf8WBdgT6Bo0EAjAecIr4ATWFgVyVVCFVIVGhJ0JbLJ2yZK5IcaJfa4QR7wf5G/B9AvajQKlQDtZSAWegNEoRLHUvSl+Fnng66uk4S6vImC9yut5/bzyO3zJLFvt+P3seKDG8QDhIeBSLoVAhg6XiSiJCVxxtsbTLklaRM18WdOHxBrwYGrOsm1uZ5s+BYwLPWfTeUqFAyAYrSV+UrgodsbStZbHIWCgLFkX+nMEPK/D36FamdYs4JnBfoezpoQ8nInsT8R9KVOKOd7ScpWML2yqLcx3nXu/BAQeHwxX+TFa0/6VPPeThcql6rFDdkYmsScXHqXe2b+185tzJEg4D58IP8Pj/DgCAPVIw/gWpvwAAAABJRU5ErkJggg==";
rottenText = numberRating + "%";
rottenTextColor = "red";
} else if (numberRating < 60 && numberRating >= 0) { // if the movie is rotten
rottenImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/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';
rottenText = numberRating + "%";
rottenTextColor = "green";
if (numberRating < 10) {
rottenText = " " + numberRating +"%";
}
} else if (numberRating === -1) { // if the score is not available
rottenImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcB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"
}
$('span.year').after('<span dir="ltr" id="rottentomato" ><img width="25px" height="25px" src="' + rottenImage +'"/> '+ rottenText +'</span>');
$('#rottentomato').css({
"color": rottenTextColor,
"margin-left": "10px"
});
}
});
}
// Content Script Injection, see http://wiki.greasespot.net/Content_Script_Injection
function contentEval( source ) {
if ('function' == typeof source) {
source = '(' + source + ')();'
}
var script = document.createElement('script');
script.setAttribute("type", "application/javascript");
script.textContent = source;
document.body.appendChild(script);
document.body.removeChild(script);
}
contentEval(imdb);