Created
April 12, 2009 04:35
-
-
Save youpy/93865 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
// JSActions startup | |
var windowManager = Components.classes["@mozilla.org/appshell/window-mediator;1"] | |
.getService(Components.interfaces.nsIWindowMediator); | |
var win = windowManager.getMostRecentWindow("navigator:browser"); | |
var contentWindow = getBrowser().contentWindow; | |
var url = contentWindow.location; | |
function testMatch(url) { | |
return function(script) { | |
return script.enabled && script.matchesURL(url); | |
} | |
} | |
var applyedScripts = win.GM_getConfig().getMatchingScripts(testMatch(location)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment