Skip to content

Instantly share code, notes, and snippets.

@thefloodshark
Created April 2, 2018 07:36
Show Gist options
  • Save thefloodshark/b24636d8129dd28ef7a2cb7d5a8a1dce to your computer and use it in GitHub Desktop.
Save thefloodshark/b24636d8129dd28ef7a2cb7d5a8a1dce to your computer and use it in GitHub Desktop.
Tampermonkey Userscript - Website Auto-Refresh Timer
// ==UserScript==
// @name Auto-Refresh
// @include https://www.example.com
// ==/UserScript==
//--- https://stackoverflow.com/questions/25484978/i-want-a-simple-greasemonkey-script-to-reload-the-page-every-minute
setTimeout(function(){ location.reload(); }, 20*1000);
@smshai74
Copy link

smshai74 commented Feb 1, 2021

What is the time for the auto reload in Minutes ?

@schoettl
Copy link

schoettl commented Apr 3, 2021

You wanted to know in minutes?

(20*1000ms) / (60000ms/min) = 0,3333min

20s, the last parameter in setTimeout is in milliseconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment