Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ==UserScript==
// @name Refresher and scroller
// @namespace refresh-and-scroll
// @description Refreshes page after 5s and scrolls to 1000px.
// @match https?://yourdomain.com/*
// @version 0.1
// ==/UserScript==
window.addEventListener('load', function() {
window.scrollTop = 1000 /* px from the top */;
});
window.setTimeout(function() {
window.location.reload();
}, 5 * 1000 /* 5s */);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment