Greasy Fork is available in English.

Auto Refresh Page with Menuuuu

Automatically refresh the page every 30 seconds with menu controluuu

Ce script ne doit pas être installé directement. C'est une librairie destinée à être incluse dans d'autres scripts avec la méta-directive // @require https://update.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
})();