您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Try to prevent websites from detecting tab focus without breaking functionality
// ==UserScript== // @name Forced Visibility // @author d3ad connection // @match https://*/* // @match http://*/* // @include * // @description Try to prevent websites from detecting tab focus without breaking functionality // @version 0.0.1.20250925025908 // @namespace https://greasyfork.org/users/1519047 // ==/UserScript== (function() { 'use strict'; try { Object.defineProperty(document, 'hidden', { configurable: true, get: () => false }); } catch(e) {} try { Object.defineProperty(document, 'visibilityState', { configurable: true, get: () => 'visible' }); } catch(e) {} try { document.hasFocus = () => true; } catch(e) {} window.addEventListener('visibilitychange', e => e.stopImmediatePropagation(), true); })();