Automatically refresh the page every 30 seconds with menu controluuu
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/478226/1270041/Auto%20Refresh%20Page%20with%20Menuuuu.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
// @version 1.1
// ==/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
})();