How to register my own firefox extension?

被刻印的时光 ゝ 提交于 2019-12-06 09:35:34

问题


I am trying to learn how to write firefox extensions. I download an HelloWorld example from here but I can't figure out how to register it.

I found my profiles extension folder (Easy since I use the latest Firefox version) but couldn't really understand what is this "Pointer file" that I need to create (tried a shortcut but it didn't work).

What is this "Pointer File"? How can I register it correctly? I am using Win 7 if matters.

Thank You.


回答1:


You have to create a file in the extensions folder with the ID of the add-on as name (e.g. helloworld@mozilla.doslash.org). This file should contain only one line which is the absolute path to the folder where the add-on is contained (e.g. C:\\my\path\to\addon (or however windows paths look like)).




回答2:


The add-on name is located inside of the install.rdf file. Usually, it's a GUID string, but for the demo it will look like an email address.

The filename will need to match that exactly and be free of any .txt extensions, so be careful your text editor doesn't automatically give it an extension.



来源:https://stackoverflow.com/questions/4580551/how-to-register-my-own-firefox-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!