Old YouTube Rating Colours

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

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey, Greasemonkey или Violentmonkey.

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

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Violentmonkey.

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Userscripts.

За да инсталирате скрипта, трябва да инсталирате разширение като Tampermonkey.

За да инсталирате този скрипт, трябва да имате инсталиран скриптов мениджър.

(Вече имам скриптов мениджър, искам да го инсталирам!)

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

(Вече имам инсталиран мениджър на стиловете, искам да го инсталирам!)

// ==UserScript==
// @name         Old YouTube Rating Colours
// @namespace    http://kippykip.x10.mx/
// @version      1.3.3
// @description  Makes the rating bar and thumbs have the original red & green look.
// @author       Kippykip
// @match        *://www.youtube.com/*
// @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 !important;font-size:9pt;vertical-align:top}');
addGlobalStyle('.sprite-like[aria-checked="true"]:before{background:no-repeat url(//i.imgur.com/lzqNC8X.png) 0 -19px !important;background-size:auto;width:14px;height:14px}');
addGlobalStyle('.sprite-dislike[aria-checked="true"]:before{background:no-repeat url(//i.imgur.com/lzqNC8X.png) 0 -112px !important;background-size:auto;width:14px;height:14px}');