The Sexy Button

Allow The Button to change colour

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         The Sexy Button
// @namespace    http://www.reddit.com/r/thebutton
// @version      0.1
// @description  Allow The Button to change colour
// @author       Ray57
// @match        http://www.reddit.com/r/thebutton
// @match        http://www.reddit.com/r/thebutton/
// @grant        none
// ==/UserScript==

(function(){var colorblind = document.createElement('span');
colorblind.className = 'thebutton-colorblind';
$('.thebutton-counter').prepend(colorblind);
colorTimer = window.setInterval(function(){ 
var s = r.thebutton._msgSecondsLeft, ring = $('#thebutton'), color = '';
ring.css('-webkit-transition', 'background-color 0.4s')
    .css('-moz-transition', 'background-color 0.4s')
    .css('-ms-transition', 'background-color 0.4s')
    .css('-o-transition', 'background-color 0.4s')
    .css('transition', 'background-color 0.4s')
if (s < 12) { ring.css('background-color', '#e50000'); color = 'red' } else
if (s < 22) { ring.css('background-color', '#e59500'); color = 'orange' } else
if (s < 32) { ring.css('background-color', '#e5d900'); color = 'yellow' } else
if (s < 42) { ring.css('background-color', '#02be01'); color = 'green' } else
if (s < 52) { ring.css('background-color', '#0083c7'); color = 'blue' } else
{ ring.css('background-color', '#820080'); color = 'purple' }
$('.thebutton-colorblind').text(color + ' - ')}, 10);})();