Old YouTube Rating Colours

Makes the rating bar and thumbs have the original red & green look.

目前為 2016-02-25 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Old YouTube Rating Colours
// @namespace    http://kippykip.x10.mx/
// @version      1.2
// @description  Makes the rating bar and thumbs have the original red & green look.
// @author       Kippykip
// @match        https://*.youtube.com/watch*
// @grant        none
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

//Rating bar
addGlobalStyle('.video-extras-sparkbar-likes{float:left;height:2px;background: #00DD00 !important;}');
addGlobalStyle('.video-extras-sparkbar-dislikes{float:left;height:2px;background: #EE0000 !important;}');
addGlobalStyle('.like-button-renderer-like-button.yt-uix-button-toggled .yt-uix-button-content{color: #00BB00}');
addGlobalStyle('.like-button-renderer-like-button.yt-uix-button.yt-uix-button-toggled:before{background:no-repeat url(//i.imgur.com/2zFI0q0.png) -299px -44px;background-size:auto;width:20px;height:20px}');
addGlobalStyle('.like-button-renderer-like-button:active .yt-uix-button-content,.like-button-renderer-like-button.yt-uix-button-toggled .yt-uix-button-content{color:#00CC00}');
addGlobalStyle('.like-button-renderer-like-button.yt-uix-button:active:before,.like-button-renderer-like-button.yt-uix-button.yt-uix-button-toggled:before{background:no-repeat url(//i.imgur.com/2zFI0q0.png) -299px -44px;background-size:auto;width:20px;height:20px}');
//Red dislikes!
addGlobalStyle('.like-button-renderer-dislike-button.yt-uix-button:active:before,.like-button-renderer-dislike-button.yt-uix-button.yt-uix-button-toggled:before{background:no-repeat url(//i.imgur.com/2zFI0q0.png) -113px -83px;background-size:auto;width:20px;height:20px}');
addGlobalStyle('.like-button-renderer-dislike-button.yt-uix-button-toggled .yt-uix-button-content{color: #BB0000}');

//Comments!
addGlobalStyle('.comment-renderer-like-count{margin-right:8px;color:#00BB00;font-size:9pt;vertical-align:top}');
addGlobalStyle('.sprite-like[data-action-on] {background: no-repeat url(//i.imgur.com/8qPnuJ6.png) 0 -92px !important;background-size: auto;width: 14px;height: 14px;opacity: 1}');
addGlobalStyle('.sprite-dislike[data-action-on]{background:no-repeat url(//i.imgur.com/8qPnuJ6.png) 0 -219px !important;background-size:auto;width:14px;height:14px;opacity:1}');