Skip to content

Instantly share code, notes, and snippets.

@wareya
Last active June 5, 2018 13:33
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 wareya/7bbc680f277abb72fe00d8d653bf9f7e to your computer and use it in GitHub Desktop.
Save wareya/7bbc680f277abb72fe00d8d653bf9f7e to your computer and use it in GitHub Desktop.
greasemonkey script that keeps me off reddit
// ==UserScript==
// @name Block Reddit
// @version 1
// @grant none
// @include http://*.reddit.com/*
// @include https://*.reddit.com/*
// @run-at document-start
// ==/UserScript==
async function delete_page()
{
document.documentElement.innerHTML = "<body>stahp</body>";
refresh_loop();
}
function refresh_loop()
{
lookup_timer = setTimeout(delete_page, 10);
}
delete_page();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment