Skip to content

Instantly share code, notes, and snippets.

@thefloodshark

thefloodshark/.js

Created Apr 2, 2018
Embed
What would you like to do?
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

This comment has been minimized.

Copy link

@smshai74 smshai74 commented Feb 1, 2021

What is the time for the auto reload in Minutes ?

@schoettl

This comment has been minimized.

Copy link

@schoettl 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