Last active
December 31, 2016 18:20
-
-
Save techninja1008/fdf73fd200fcb16a45deea6b0d2b1fb7 to your computer and use it in GitHub Desktop.
DGS-1224T Fixer Userscript
This file contains hidden or 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
// ==UserScript== | |
// @name DGS-1224T Fix | |
// @namespace http://wensley.eu/ | |
// @version 0.1 | |
// @description Fixes DGS-1224T UI | |
// @author Danny Wensley | |
// @match */* | |
// @require http://code.jquery.com/jquery-latest.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function doStuff(win){ | |
var res = /onload="location.href='(.*)'"/.exec(win.document.documentElement.innerText); | |
win.location.href = res[1]; | |
} | |
if(document.title === "DGS-1224T" || window.location.pathname === "/smartwizard.htm"){ | |
setInterval(function(){ | |
var frames = $('frame').toArray().concat($('iframe').toArray()); | |
for(var i = 0; i < frames.length; i++){ | |
if(frames[i].contentWindow.document.documentElement.innerText.match(/http-equiv='Page-Exit'/)){ | |
doStuff(frames[i].contentWindow); | |
} | |
} | |
if(document.documentElement.innerText.match(/http-equiv='Page-Exit'/)){ | |
doStuff(window); | |
} | |
}, 1000); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you know how to use TamperMonkey, then use this as a userscript.
If you have never used TamperMonkey before, then go to http://tampermonkey.net/, and install the plugin for your browser. Afterwards, go to https://gist.github.com/techninja1008/fdf73fd200fcb16a45deea6b0d2b1fb7/raw/65a2311e8c694083cc37e11f438c6652fc239af6/fix.user.js, and click install. The UI should now work.