Skip to content

Instantly share code, notes, and snippets.

@kennethkufluk
Created February 12, 2011 21:25
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 kennethkufluk/824148 to your computer and use it in GitHub Desktop.
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.
// ==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