Download the Firefox extension for a specific page load

I am trying to create a bootable Firefox extension.

I want the firefox extension to load from the launch function in bootstrap.js on a specific page load and need to inject a DOM element on that page.

I just want it to be done ... so that I can tell if my Firefox extension is installed in the browser or not.

I tried PageMod methods but the extension won't load.

Thanks in advance for your help.

+3


source to share


1 answer


Well, you need your extension to always load, otherwise it might not detect when the landing page loads. Like Greasemonkey, you can enlarge webpages if enabled. The second option consists of two extensions, one for monitoring and launching the second. But I don't think this is your business.

If you just want to show an HTML element on a specific web page, you should:



1) watch for changes in the URL. You can add an event listener to your tabs and access the url using utils.getMostRecentBrowserWindow (). Document 2) add a content script, with code adding the required DOM elements.

tabs.activeTab.attach({         
   contentScriptFile: "./yourJsFileForAddingTheDomElements.js"
});

      

0


source







All Articles