从“加载项”对话框打开Firefox扩展首选项对话框

问题描述

| 我想要的很简单-我想要一个将导致正常的“首选项”对话框打开,并突出显示我的扩展程序的“首选项”面板。我本以为
<em:optionsURL>javascript:openPreferences(\"my_pref_pane\");</em:optionsURL>
本来可以做到的,但事实并非如此。我也曾想过
<em:optionsURL>chrome://myapp/browser/options.xul</em:optionsURL>
,其中options.xul具有

解决方法

这将使Firefox打开OWN插件的插件页面的插件管理器。
var am = require(\"sdk/preferences/utils\");
var self = require(\"sdk/self\");

// Open the add-on manager with the preference page for this add-on.
am.open(self);
// Returns a promise that resolves once the tab is open.
归功于freaktechnic和他的要旨。