Skip to content

Instantly share code, notes, and snippets.

@youpy
Created April 12, 2009 04:35
Show Gist options
  • Save youpy/93865 to your computer and use it in GitHub Desktop.
Save youpy/93865 to your computer and use it in GitHub Desktop.
// 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