Created
March 21, 2013 20:16
-
-
Save aprescott/5216316 to your computer and use it in GitHub Desktop.
JavaScript bookmarklet to undo a BT HomeHub's connection error page by visiting the intended URL. Visit page X, get taken to the error page, click the bookmarklet and you'll go back to X.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Save as the URL of a bookmark, and the next time your BT HomeHub takes you to a | |
* "problem with your connection" page, click the bookmark to go to the actual URL. | |
* | |
* This simply grabs the "org_url" parameter out of their error page and visits it. | |
* | |
* Useful if: | |
* | |
* 1. You don't want to retype URLs or open tabs repeatedly while checking to see | |
* the connection is up again. Just keep clicking the bookmark. | |
* 2. You open a browser that loads your previous session (with a bunch of tabs), | |
* but you're actually disconnected. The Hub will take you to error pages. | |
* Once you're back up, repeatedly Ctrl-Tab and click the bookmarklet to get | |
* all your pages back. | |
*/ | |
javascript:function getParam(a){var b=window.location.search.substring(1);var c=b.split("&");for(var d=0;d<c.length;d++){var e=c[d].split("=");if(e[0]==a){return e[1]}}}if(window.location.host=="bthomehub.home"&&window.location.search.indexOf("org_url=")!=-1){window.location.href=decodeURIComponent(getParam("org_url"))} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment