您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
15秒刷新并禁止页面休眠
// ==UserScript== // @name 8591 15秒刷新並禁止頁面休眠 // @name:zh-TW 8591 15秒刷新並禁止頁面休眠 // @name:zh-CN 8591 15秒刷新并禁止页面休眠 // @name:en 8591 Automatically refreshes // @namespace https://www.youtube.com/c/ScottDoha // @version 1.3 // @description 15秒刷新並禁止頁面休眠 // @description:zh-cn 15秒刷新并禁止页面休眠 // @description:en Automatically refreshes the page every 15 seconds and prevents the page from entering sleep mode. // @author Scott // @match *://www.8591.com.tw/* // @grant none // @license Proprietary // ==/UserScript== (function() { 'use strict'; // Refresh interval in milliseconds (15 seconds) const refreshInterval = 15000; // Function to reload the page function reloadPage() { location.reload(); } // Function to prevent the page from entering sleep mode function preventSleep() { if (document.visibilityState === 'visible') { const preventSleepFrame = document.createElement('iframe'); preventSleepFrame.style.width = '0'; preventSleepFrame.style.height = '0'; preventSleepFrame.style.border = 'none'; document.body.appendChild(preventSleepFrame); } } // Reload the page every refreshInterval milliseconds setInterval(reloadPage, refreshInterval); // Prevent the page from entering sleep mode setInterval(preventSleep, 5000); // Execute every 5 seconds })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址