Skip to content

Instantly share code, notes, and snippets.

@danbeam
Created June 4, 2013 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danbeam/5708457 to your computer and use it in GitHub Desktop.
Save danbeam/5708457 to your computer and use it in GitHub Desktop.
// ==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