Skip to content

Instantly share code, notes, and snippets.

@thefloodshark
Created April 2, 2018 07:36
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • 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);
@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