For Chrome web-browser extensions I can use the next line:
Code: Select all
location.href="javascript:SomeFunction(); void 0";
But it doesn't work for Firefox
Also in old addons for FF I could call the web-site's js function like this:
Code: Select all
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var mainWindow = wm.getMostRecentWindow("navigator:browser");
mainWindow.gBrowser.loadURI("javascript:SomeFunction(); void 0");
Any ideas?