YouTube Always Hoverable ProgressBar

Makes progressbar hoverable from the very beginning (also works when paused).

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला 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         YouTube Always Hoverable ProgressBar
// @namespace    https://github.com/Amadeus-AI
// @version      1.0.3
// @description  Makes progressbar hoverable from the very beginning (also works when paused).
// @icon         https://www.youtube.com/s/desktop/3748dff5/img/favicon_48.png
// @author       AmadeusAI
// @match        *://www.youtube.com/*
// @license      MIT
// ==/UserScript==
/*jshint esversion: 6 */

var InstantBar =
{
    css :
`
.ytp-chrome-bottom { opacity: 0 }
.ytp-chrome-top { opacity: 0 }
.ytp-gradient-bottom { opacity: 0 }
.ytp-gradient-top { opacity: 0 }
.html5-video-player:not(.ytp-fullscreen):hover > .ytp-chrome-bottom { opacity: 1 }
.html5-video-player:not(.ytp-fullscreen):hover > .ytp-gradient-bottom { opacity: 1 }
.html5-video-player.ytp-fullscreen > .ytp-chrome-bottom:hover { opacity: 1 }

`,

    apply : function()
    {
        if (typeof GM_addStyle !== "undefined")
        {
            GM_addStyle(InstantBar.css);
        }
        else
        {
            let styleNode = document.createElement("style");
            styleNode.appendChild(document.createTextNode(InstantBar.css));
            (document.querySelector("head") || document.documentElement).appendChild(styleNode);
        }
    },

    start : function()
    {
        // To overwrite youtube's default behavior
        setTimeout(InstantBar.apply, 0);
    }
};

InstantBar.start();