YouTube Instant Hover ProgressBar

Makes progressbar being able to hover from the very beginning (also works when paused).

As of 14.11.2021. See ბოლო ვერსია.

// ==UserScript==
// @name         YouTube Instant Hover ProgressBar
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Makes progressbar being able to hover from the very beginning (also works when paused).
// @author       AmadeusAI
// @match        *://www.youtube.com/*
// @license      MIT
// ==/UserScript==
/*jshint esversion: 6 */

var InstantBar =
{
    css :
`
.ytp-chrome-bottom { opacity: 0 }
.ytp-gradient-bottom { opacity: 0 }
.html5-video-player:hover .ytp-chrome-bottom{ opacity: 1 }
.html5-video-player:hover .ytp-gradient-bottom{ 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();
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元