从自定义按钮触发FireFox扩展 [英] Trigger FireFox extensions from a custom button
问题描述
我已将一些Chrome扩展程序转换为firefox .xpi,并将其安装在FF中。
他们出现在附加列表中,但是我怎样才能在工具栏的某个地方制作一个自定义按钮,并触发扩展?
在Chrome中,显示扩展名的工具栏...并触发它们。
$ b $干杯
M
如果您使用addon SDK,请执行以下操作:
< code $ // $ WIDGET METAINFO
var meta_info = widgets.Widget(
id:meta_info,
label:显示关于Meta的信息,
contentURL: data.url(icons / meta.png),
面板:meta_panel
});
var meta_panel = panel.Panel({
width:500,
height:300,
contentURL:data.url(html / meta.html),
contentScriptFile:data.url(js / meta_panel.js),
onShow:function()
{
get_metas();
}
});
如果你想在bootstrap中看到这些模板,你可以安装xpi :
我正在制作更多的模板让我知道是否有一个你想见。
I have converted some Chrome extensions to firefox .xpi and installed them in FF. They show up in the add ons list but how can I make a custom button somewhere in a toolbar and trigger the extension?
In Chrome you have a specific toolbar that shows the extensions… and To trigger them.
Cheers,
M
If you are using the addon SDK do something like this:
//WIDGET METAINFO
var meta_info = widgets.Widget({
id: "meta_info",
label: "Displays information about Meta",
contentURL: data.url("icons/meta.png"),
panel: meta_panel
});
var meta_panel = panel.Panel({
width: 500,
height: 300,
contentURL: data.url("html/meta.html"),
contentScriptFile: data.url("js/meta_panel.js"),
onShow: function()
{
get_metas();
}
});
if you want to do bootstrap see these templates here, you can install the xpi to see it in action:
I'm making more templates let me know if there's one you would like to see.
这篇关于从自定义按钮触发FireFox扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!