Auto Refresh Page with Menu

Automatically refresh the page every 30 seconds with menu control

目前为 2023-10-25 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/478226/1270040/Auto%20Refresh%20Page%20with%20Menu.js

// ==UserScript==
// @name         Auto Refresh Page with Menu
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Automatically refresh the page every 30 seconds with menu control
// @author       cumchugger
// @match        https://hvr-amazon.my.site.com/ApplicationShiftSelect?appid=a014U00002v8PczQAE
// @grant        gusuwjwewueuewuewueuweeew
// @license my dick and balls
// ==/UserScript==

(function() {
    'use strict';
    
    let isAutoRefreshEnabled = true;
    
    GM_registerMenuCommand('Toggle Auto Refresh', function() {
        isAutoRefreshEnabled = !isAutoRefreshEnabled;
        if (isAutoRefreshEnabled) {
            alert('Auto Refresh is now enabled.');
        } else {
            alert('Auto Refresh is now disabled.');
        }
    });
    
    setInterval(function() {
        if (isAutoRefreshEnabled) {
            location.reload();
        }
    }, 30000); // 40,000 milliseconds = 40 seconds
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址