// ==UserScript== // @name 加速百度手机端查询速度 // @namespace 申禅姌 // @version 0.0.1 // @description 【测试版本】【仅安卓版edge浏览器可用】加速百度手机网页端查询速度,有时在百度手机网页端查询内容时会出现长时间等待,原因未知,此脚本效果未知,仅供测试 // @author 申禅姌 // @match https://www.baidu.com/* // @grant unsafeWindow // ==/UserScript== (function () { // 劫持 setTimeout const originalSetTimeout = unsafeWindow.setTimeout unsafeWindow.setTimeout = function (callback, delay, ...args) { if (typeof callback === "function" && callback.toString().includes('document.visibilityState')) { if (document.visibilityState === "hidden") { callback(...args) return 666 } } return originalSetTimeout(callback, delay, ...args) } })()