您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes the controls bar when paused when h button is pressed
当前为
// ==UserScript== // @name Youtube Control Hider // @namespace http://tampermonkey.net/ // @version 0.12 // @description Removes the controls bar when paused when h button is pressed // @author Kaanium // @match https://www.youtube.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; var elementsHidden = false; var _top, top_grad, _bottom, bottom_grad; function checkElements() { if (document.URL.includes('live_chat_replay')) { return; } else if (!_top || !top_grad || !_bottom || !bottom_grad) { _top = document.querySelector(".ytp-chrome-top"); top_grad = document.querySelector(".ytp-gradient-top"); _bottom = document.querySelector(".ytp-chrome-bottom"); bottom_grad = document.querySelector(".ytp-gradient-bottom"); console.log(_top, top_grad, _bottom, bottom_grad) setTimeout(checkElements, 100); } else { addKeyListener(); } } function addKeyListener() { document.addEventListener('keydown', function(event) { if (event.key === "h") { if (elementsHidden) { showElements(); } else { hideElements(); } elementsHidden = !elementsHidden; } }); } function hideElements() { _top.style.visibility = 'hidden'; top_grad.style.visibility = 'hidden'; _bottom.style.visibility = 'hidden'; bottom_grad.style.visibility = 'hidden'; } function showElements() { _top.style.visibility = 'visible'; top_grad.style.visibility = 'visible'; _bottom.style.visibility = 'visible'; bottom_grad.style.visibility = 'visible'; } checkElements() })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址