Greasy Fork is available in English.
Adds an event listener on the letter `h` to toggle video overlay visibility
当前为
// ==UserScript==
// @name Crunchyroll Video overlay visibility toggle
// @namespace http://greasyfork.icu/en/users/1210956-requiemofspirit
// @version 1.0.0
// @description Adds an event listener on the letter `h` to toggle video overlay visibility
// @author RequiemOfSpirit
// @homepage https://github.com/RequiemOfSpirit
// @match https://static.crunchyroll.com/vilos-*
// @license MIT
// @icon https://upload.wikimedia.org/wikipedia/commons/7/75/Cib-crunchyroll_%28CoreUI_Icons_v1.0.0%29_orange.svg
// ==/UserScript==
(function() {
'use strict';
document.addEventListener('keyup', (e) => {
const overlay = document.querySelector("#velocity-controls-package");
if (e.key !== 'h' || overlay == undefined) {
return;
}
overlay.style.opacity = (overlay.style.opacity === '0') ? 1 : 0;
});
})();