我需要创建一个为少数同事设计的插件,以自动化表单输入。我已经能够编辑一个示例插件,并通过将.xpi拖放到浏览器中将其安装到firefox。
我现在正尝试从头开始创建相同的功能,但我在install.rdf文件中遇到与updateURL相关的错误。我没有服务器,这个插件永远不会出现在插件市场上。无论如何,我配置我的install.rdf,以便我不需要这个字段?我已经阅读了mozilla dev指南,根据最小/最大版本元素可能需要该字段。也许我可以编辑这些以避免updateURL'要求'?
<em:minVersion>2.0</em:minVersion>
<em:maxVersion>3.1b2</em:maxVersion>
答案 0 :(得分:0)
将其粘贴到您的install.rdf并更新我告诉您的3个部分:
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>user3186636_PUT_YOUR_ADDON_NO_SAPCES_NO_SPECIAL_CHARACTERS_NAME_HERE@jetpack</em:id>
<em:version>1.2</em:version>
<em:type>2</em:type>
<em:bootstrap>true</em:bootstrap>
<em:unpack>false</em:unpack>
<!-- Firefox -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>26.0</em:minVersion>
<em:maxVersion>26.0</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Front End MetaData -->
<em:name>user3186636_PUT_YOUR_ADDON_NAME_HERE</em:name>
<em:description>user3186636_PUT_YOUR_DESCRIPTION_HERE</em:description>
<em:creator>Noitidart</em:creator>
</Description>
</RDF>
这是一个关于我的插件install.rdf如何看起来的演示:
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>loadcontext-and-http-modify-observer@jetpack</em:id>
<em:version>initial</em:version>
<em:type>2</em:type>
<em:bootstrap>true</em:bootstrap>
<em:unpack>false</em:unpack>
<!-- Firefox -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>26.0</em:minVersion>
<em:maxVersion>26.0</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Front End MetaData -->
<em:name>loadcontext and http modify observer</em:name>
<em:description>ff-research-addon: exploring how loadcontext works, how it can be used to get html and xul windows of http loads</em:description>
<em:creator>Noitidart</em:creator>
</Description>
</RDF>