您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
给 Idle Detection API 的调用者一个虚假的 active 响应
// ==UserScript== // @name Idle Detection Bypasser // @name:zh 绕过 Idle Detection // @name:zh-CN 绕过 Idle Detection // @namespace https://github.com/flyhaozi // @version 0.2.1 // @description Give a fake active response to the caller of the Idle Detection API // @description:zh 给 Idle Detection API 的调用者一个虚假的 active 响应 // @description:zh-CN 给 Idle Detection API 的调用者一个虚假的 active 响应 // @author flyhaozi // @match https://*/* // @match http://*/* // @run-at document-start // @grant none // ==/UserScript== (function() { 'use strict'; // https://wicg.github.io/idle-detection/#api // https://chromium.googlesource.com/chromium/src/+/01971188f2f12266e0e4d119a294c52f4a3b0f41/third_party/blink/renderer/modules/idle/idle_detector.h // https://chromium.googlesource.com/chromium/src/+/01971188f2f12266e0e4d119a294c52f4a3b0f41/third_party/blink/renderer/modules/idle/idle_detector.cc const fakeDetector = function() { this.userState = null; this.screenState = null; }; fakeDetector.requestPermission = async function() { return Promise.resolve('granted'); }; fakeDetector.prototype = Object.create(EventTarget.prototype); fakeDetector.prototype.start = async function(options) { this.userState = 'active'; this.screenState = 'unlocked'; this.dispatchEvent(new Event('change')); }; Object.defineProperty(window, 'IdleDetector', { value: fakeDetector, configurable: false, writable: false }); console.log('Idle Detector Hijacked!'); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址