您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Disable/remove video overlays on web pages. This script applies on all sites by default, and must be manually configured to exclude specific sites. Note: this is a somewhat aggresive blocker, where it may break site functionality.
当前为
// ==UserScript== // @name Disable Video Popouts // @namespace https://greasyfork.org/en/users/85671-jcunews // @version 1.0.1 // @license AGPLv3 // @author jcunews // @description Disable/remove video overlays on web pages. This script applies on all sites by default, and must be manually configured to exclude specific sites. Note: this is a somewhat aggresive blocker, where it may break site functionality. // @match *://*/* // @exclude *://dont-block.this.com/* // @grant none // ==/UserScript== (() => { var ans = ["class", "style"]; function chkParentEle(n) { while (n = n.parentNode) { if (getComputedStyle(n).position === "fixed") { n.remove(n); break; } } } function chkEle(n) { if (n.tagName) { if (n.tagName !== "VIDEO") { if (n.querySelector('video')) { if (getComputedStyle(n).position === "fixed") { n.remove(n); } else chkParentEle(n); } } else chkParentEle(n); } } (new MutationObserver(recs => { recs.forEach((r, i) => { r.addedNodes.forEach((n) => chkEle(n)); if (ans.includes(r.attributeName)) chkEle(r.target); }); })).observe(document, {attributes: true, childList: true, subtree: true}); })();