// ==UserScript== // @name YouTube 隱藏進度條(滑鼠移入才會顯示 // @namespace http://tampermonkey.net/ // @version 0.1 // @description YouTube 隱藏進度條 // @author You // @license MIT // @match https://www.youtube.com/* // @match https://v.anime1.me/watch* // @grant none // @run-at document-start // @downloadURL none // ==/UserScript== (function () { 'use strict'; var css = ''; if (location.href.indexOf('https://www.youtube.com/') === 0) { css = ` .ytp-chrome-bottom { opacity: 0; } .ytp-chrome-bottom:hover { opacity: 1; } ` } if (location.href.indexOf('https://v.anime1.me/watch') === 0) { css = ` .jw-controlbar { opacity: 0; } .jw-controlbar:hover { opacity: 1; } ` } if (typeof GM_addStyle != "undefined") { GM_addStyle(css); } else if (typeof PRO_addStyle != "undefined") { PRO_addStyle(css); } else if (typeof addStyle != "undefined") { addStyle(css); } else { var node = document.createElement("style"); node.type = "text/css"; node.appendChild(document.createTextNode(css)); var heads = document.getElementsByTagName("html"); if (heads.length > 0) { heads[0].appendChild(node); } else { document.documentElement.appendChild(node); } } })();