Firefox扩展测试和开发

Firefox扩展测试和开发

本文介绍了Firefox扩展测试和开发 - 我很困惑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我为Google Chrome编写扩展程序时,我只创建了manifest.json文件和JS文件,这是我的脚本。安装后,我可以改变代码中的任何东西,我只刷新浏览器,我已经改变了扩展的版本。
$ b $ 1)安装Firefox扩展程序后,我可以更改一些代码吗?或者我应该重新安装它?或者我需要重新加载它 - 以及如果可能的话?



2)我应该创建install.rdf,chrome.manifest,* .xul文件等等手工(whick文件夹结构等)?或者是有另一种最简单的方法来做到这一点?


$ b $ 3我不明白,我应该通过附加SDK创建扩展或手写记事本?他们有什么不同?


$ b $ 4)我正在编写最简单的脚本,当我通过浏览器打开任何页面时,调用alert('hello world')。什么是最好和最快的方式来做到这一点?



非常感谢;

解决方案

使用< ; em:bootstrap> true< / em:bootstrap> and

修改

附加SDK是一个;是的问题;取决于你

hello_world.xpi(chrome / content / hello.xul):

 <?xml version =1.0?> 
<?xml-stylesheet href =chrome:// global / skintype =text / css?>

< window xmlns:html =http://www.w3.org/1999/xhtml
xmlns =http://www.mozilla.org/keymaster/gatekeeper /there.is.only.xul\">

< caption label =Hello World/>

< / window>

另外, should help。
$ b




when I'm writing extension for Google Chrome, I only create "manifest.json" file and JS file, which is my script. after installing , I can change anything in the code, I only refresh browser and I had changed version of extension.

1) Can I change some code after installing Firefox extension? Or should I reinstall it? Or should I need to reload it again - and how if its possible?

2) should I create install.rdf, chrome.manifest, *.xul files and so in by hand (whick folder structure and so on)? Or is there another simplest way to do this?

3) I don't understand, should i create extensions by "Add-on SDK" or write by hand with notepad? what is difference of them?

4) I'm writing simplest script, which invoke alert('hello world') when i open any page by browser. what is the best and fastest way to do this?

thanks a lot;

解决方案

Live updates are possible using <em:bootstrap>true</em:bootstrap> and bootstrap functions

Neither; modify an existing simple extension

Add-on SDK is an sdk; by hand is xul; depends on you

hello_world.xpi (chrome / content / hello.xul):

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>

<window xmlns:html="http://www.w3.org/1999/xhtml"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <caption label="Hello World"/>

</window>

In addition, extension development tools should help.

References

这篇关于Firefox扩展测试和开发 - 我很困惑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 16:05