Created
September 3, 2010 14:02
-
-
Save dtinth/563916 to your computer and use it in GitHub Desktop.
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
function load() { | |
var prefix = 'http://tw.dt.in.th/thaiWitter/'; | |
if (window.location.href.substr(0, prefix.length) == prefix) { | |
// do some required work here | |
} | |
var mediator = Components.classes["@mozilla.org/appshell/window-mediator;1"] | |
.getService(Components.interfaces.nsIWindowMediator); | |
var windows = mediator.getEnumerator(null); | |
while (windows.hasMoreElements()) { | |
var currentWindow = windows.getNext(); | |
if (currentWindow.location.href == 'chrome://webrunner/content/webrunner.xul') { | |
var browser = currentWindow.document.getElementById('browser_content'); | |
if (browser.contentWindow.wrappedJSObject == window) { | |
currentWindow.WebRunner._firstLoad = true; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment