Created
February 12, 2011 21:25
-
-
Save kennethkufluk/824148 to your computer and use it in GitHub Desktop.
Fix for OU sites that wrongly load empty frames with src="#", breaking frameset navigation in modern browsers.
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== | |
// @match http://students.open.ac.uk/* | |
// ==/UserScript== | |
if (top==window) { | |
var myframes = document.getElementsByTagName('frame'); | |
for (var frame in myframes) { | |
if (!myframes.hasOwnProperty(frame) || typeof myframes[frame] == 'undefined' ) continue; | |
if (myframes[frame].src.match(/\/#$/)) myframes[frame].src="about:blank"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment