CL2*_*L22 4 javascript firefox firefox-addon firefox-addon-sdk palemoon
我正在尝试在Pale Moon (Firefox 的变体)中使用一个非常基本的扩展。
lib\main.js:
var data = require("sdk/self");
var pageMod = require("sdk/page-mod");
pageMod.PageMod({
include: "*.annoyingsite.com",
contentScriptFile: [data.url("script.js")]
});
Run Code Online (Sandbox Code Playgroud)
lib\script.js:
document.getElementById("annoyingElement").setAttribute("style", "display: none;");
Run Code Online (Sandbox Code Playgroud)
但我收到错误:
[extension_name] could not be installed because it is not compatible with Pale Moon 24.7.2
Run Code Online (Sandbox Code Playgroud)
我尝试阅读 CFX 文档并在 stackoverflow 上查看。minVersion我发现的唯一提示可能是与/ maxVersionin有关install.rdf,但我什么也没得到。请帮忙!
他们更改了 Pale Moon 的 GUID。我认为这是一个愚蠢的举动,但我认为这是必要的。
更多信息请点击这里:
MozillaZine :: Pale Moon 已更改其 GUID
PaleMoonForum :: 扩展和 Pale Moon 25
你必须将其添加到你的 install.rdf 中:
<em:targetApplication><!-- Pale Moon -->
<Description>
<em:id>{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}</em:id>
<em:minVersion>25.0</em:minVersion>
<em:maxVersion>25.*</em:maxVersion>
</Description>
</em:targetApplication>
Run Code Online (Sandbox Code Playgroud)
因此,将您的插件编译为xpi,然后重命名为zip,然后编辑install.rdf,添加pale Moon的GUID,然后将其压缩回来,然后重命名为xpi
| 归档时间: |
|
| 查看次数: |
826 次 |
| 最近记录: |