15楼#
发布于:2017-01-04 14:24
多谢,但我有两个问题。
1. 正如楼上所说,直接在ff配置文件夹里修改扩展,虽然当时可以生效,但是一段时间后就会提示签名无效。所以我想自己申请签名。但是我不知道为什么打包不了xpi。总是显示损坏,所以更没法弄签名。能不能帮我打包一个xpi,我去弄签名。 2. 楼上提供的方法没听说过,50.x以后的版本都可以用吗? |
|
16楼#
发布于:2017-01-04 13:54
hill:我就是这么做的。看了下,这个扩展虽然是将xpi解压到linkalert.conlan@addons.mozilla.com路径内,但如果修改该路径内的任何文件,都会导致该路径内的签名文件失效。firefox v48之后的版本自动禁止为签名扩展,可以用下面的方法绕过强制签名。 // Create a file first, you can do it with a text document editor. // Paste the following code (10-15 lines) into the document. // Save the document afterwards. // Right-click on it, and rename to config.js, make sure it is called config.js, not config.js.txt. // Move the config.js file in the Firefox installation folder. // On Windows, this is C:\Program Files\Mozilla Firefox\ or C:\Program Files (x86)\Mozilla Firefox\. // On OS/X, it is /Applications/Firefox.app/. // On Linux, it is /usr/lib/firefox-<version>/ or /usr/lib64/firefox-<version>/. // try { Components.utils.import("resource://gre/modules/addons/XPIProvider.jsm", {}) .eval("SIGNED_TYPES.clear()"); } catch(ex) {} // Create a second text document and open it afterwards in a text editor. // Paste the following code (6 and 7 lines) into it. // Rename the file to config-prefs.js. // Move the file into the name is "pref" in "defaults" folder of the Firefox program folder. pref("general.config.obscure_value", 0); pref("general.config.filename", "config.js"); |
|
17楼#
发布于:2017-01-04 11:50
难道要装java sdk
|
|
18楼#
发布于:2017-01-03 17:22
|
|
19楼#
发布于:2017-01-03 17:19
我就是这么做的。
linkalart.jar是我自己修改好的,上传时由于论坛限制改成了TXT。 把linkalart.jar直接放到我目前ff的配置里是直接可以起作用的。但一段时间后,ff会自检出扩展的安全问题,强制禁用。 所以我才想做到扩展里,然后签名。 |
|
20楼#
发布于:2017-01-03 16:03
怎么能这么改呢。jar本质是一个zip格式压缩包,里面还有实际运行的代码等文件。按照扩展本来的结构弄好以后,先压缩成zip格式,然后改名为jar格式。最上层也是按照原来结构弄好,打包成zip格式,再改成xpi格式。
|
|
|
上一页
下一页