I downloaded this Firefox sample extension from mozilla.org, I modified the file install.rdf and changed maxVersion
value to 3.6.10
(also tried 3.6.*
, 100
and *
) and I added a new string with name "hello world" and the value is the path where the folder of the sample extension is to HKCU (also tried HKLM)/Software/Mozilla/Firefox/Extensions/
into the registry.
I start Firefox, go to Tools > Addons
, and it says it needs to restart, I restart and go there again and the plugin appears but says "Not compatible with Firefox 3.6.10", and every button appears disabled. Also removing the registr开发者_如何学Goy key and folder doesn't uninstall it.
Is there something else I have to change to use the hello world sample in Firefox 3.6.10?
Update 2018
This sample extension was created in 2000s and Firefox switched to a radically different extension system called "Web Extensions" in 2017. The old extensions will not work in the current versions of Firefox and have to be rewritten completely.
The easiest way to start developing an extension is putting a "pointer" file in the extensions folder in the profile directory. I wouldn't touch the registry method until the deployment moment.
Thanks for reminding me to update the example extension. Updated it now.
Basically, the best way to use an extension is to package the addon in .xpi format. Then you just have to open this addon with Firefox. Note:To make an .xpi , take all the contents of helloworld like content,locale,skin,install.rdf,chrome.manifest etc and try to zip it but change the extension to .xpi instead of .zip. Otherwise u can just rename ur helloworld folder to helloworld@xyz.com and then copy this folder into C:\Users\"OS user name"\AppData\Roaming\Mozilla\Firefox\Profiles\h31hcfq9.default\extensions and then restart ur browser. Also, it would be best to learn about addon development with this Basic tutorial on addon development
The procedure to create sample firefox extension can be found on this link. This tutorial explains how to create a Firefox extension to find all links in the current web page, highlight those which have a target attribute and alert you how many links it found.
精彩评论