Skip to content

Instantly share code, notes, and snippets.

@frdmn
Created December 31, 2013 01:44
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 frdmn/8191102 to your computer and use it in GitHub Desktop.
Save frdmn/8191102 to your computer and use it in GitHub Desktop.
Reddit outage refresh - UserScript which adds auto refresh on the "we took too long to make this page for you - try again and hopefully we will be fast enough this time." outage page of Reddit. No need for firing CMD+R anymore.
// ==UserScript==
// @name Reddit outage refresher
// @version 0.1
// @author frdmn
// @match http://www.reddit.com/*
// ==/UserScript==
var xpathResult = document.evaluate("(//text()[contains(., 'try again and hopefully we will be fast enough this time.')])[1]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
var node=xpathResult.singleNodeValue;
if (node!=null) {
location.reload(true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment