Bean's better chain timer

Browse Torn easier while chaining, with a bigger chain timer that follows when scrolling.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला 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         Bean's better chain timer
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  Browse Torn easier while chaining, with a bigger chain timer that follows when scrolling.
// @author       ScatterBean [3383329]
// @license      MIT
// @match        www.torn.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

const bar = document.getElementsByClassName('chain-bar___vjdPL')[0];
const gttButton = document.getElementsByClassName('goToTopBtn___TSzPY')[0];
const timer = document.getElementsByClassName('bar-timeleft___B9RGV')[0];
const speed = document.getElementsByClassName('speed___dFP2B')[0];
document.getElementsByClassName('bar-stats___E_LqA')[0].style.display = 'inline';
document.addEventListener('scroll', () => UpdateUI());
timer.style.fontSize = '40px';
if (speed) {
    speed.style.top = '5px';
    speed.style.left = '100px';
}

function UpdateUI() {
    bar.style.zIndex = '9999';
    if (gttButton.classList.contains('show___M59HD')) {
        bar.style.position = 'fixed';
        bar.style.right = '40px';
        bar.style.top = '10px';
        bar.style.width = '155px';
        bar.style.backgroundColor = '#333';
        bar.style.border = 'solid 1px white';
        bar.style.borderRadius = '3px';
    }
    else {
        bar.style.position = 'relative';
        bar.style.right = '0px';
        bar.style.top = '0px';
        bar.style.width = 'initial';
        bar.style.backgroundColor = 'initial';
        bar.style.borderRadius = 'initial';
        bar.style.border = 'initial';
    }
}