-
Notifications
You must be signed in to change notification settings - Fork 4
/
Kitsu Human Score.user.js
63 lines (60 loc) · 2.31 KB
/
Kitsu Human Score.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
// ==UserScript==
// @name Kitsu Human Score
// @namespace http://tampermonkey.net/
// @version 1.0.2
// @description Puts words next to the rating while rating an anime for a more accurate way to select how you thought an anime was.
// @author Abraham Gross
// @match https://kitsu.io/users/*
// @require https://code.jquery.com/jquery-2.1.4.min.js
// @updateURL https://openuserjs.org/meta/grenzionky/Kitsu_Human_Score.meta.js
// @downloadURL https://openuserjs.org/install/grenzionky/Kitsu_Human_Score.user.js
// @license MIT
// ==/UserScript==
(function() {
document.body.onclick = function(){
if(document.querySelector(".noUi-tooltip")){
addWord();
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
addWord();
});
});
observer.observe(document.querySelector('div.noUi-tooltip'), { childList: true });
}
};
})();
function addWord() {
var score = document.querySelector('div.noUi-tooltip');
switch(score.textContent) {
case "10": score.textContent = score.textContent + " (Masterpiece)";
break;
case "9.5":
case "9": score.textContent = score.textContent + " (Amazing)";
break;
case "8.5":
case "8": score.textContent = score.textContent + " (Great)";
break;
case "7.5":
case "7": score.textContent = score.textContent + " (Fine)";
break;
case "6.5":
case "6": score.textContent = score.textContent + " (Average)";
break;
case "5.5":
case "5": score.textContent = score.textContent + " (Boring)";
break;
case "4.5":
case "4": score.textContent = score.textContent + " (Bad)";
break;
case "3.5":
case "3": score.textContent = score.textContent + " (Very Bad)";
break;
case "2.5":
case "2": score.textContent = score.textContent + " (Horrible)";
break;
case "1.5":
case "1": score.textContent = score.textContent + " (Appaling)";
break;
}
}