Skip to content

Instantly share code, notes, and snippets.

@nomomon
Last active August 18, 2021 15:06
Show Gist options
  • Save nomomon/f5dc1b018ac739b000b313a99693bd48 to your computer and use it in GitHub Desktop.
Save nomomon/f5dc1b018ac739b000b313a99693bd48 to your computer and use it in GitHub Desktop.
Bookmarklet to reload a page in a give time
(() => {
let t = prompt("exit in what time? (min)");
if(t !== null){
setTimeout(() => {
location.href = location.origin;
}, t * 60 * 1000)
}
})();
@nomomon
Copy link
Author

nomomon commented Aug 18, 2021

Bookmarklets are browser bookmarks that execute JavaScript instead of opening a webpage. They're also known as bookmark applets, favlets, or JavaScript bookmarks.

To use this a bookmarklet follow this tutorial.

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