无法在Firefox 64上安装我自己的扩展程序。我在调试模式下成功对其进行了测试。现在,我在安装时遇到了大问题:损坏!我不知道该怎么办。研究了所有文档。没有成功我压缩了所有文件的整个文件夹,并将其重命名为* .xpi!
icons/cancel.png
close.js
install.rdf
install.xpi
manifest.json
function sleep(milliseconds) {
var start = new Date().getTime();
for (var i = 0; i < 1e7; i++) {
if ((new Date().getTime() - start) > milliseconds){
break;
}
}
}
sleep(1000);
if (
(
document.documentElement.textContent || document.documentElement.innerText
).indexOf('Live your life') > -1
) {
window.close();
}
{
"manifest_version": 2,
"name": "pm",
"version": "1.0",
"description": "Schließt nach 121 Sekunden",
"content_scripts": [
{
"matches": ["*://*/"],
"js": ["close.js"]
}
],
"icons":
{
"64": "icons/cancel.png"
}
}
<?xml version="1.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>xyz@gmx.de</em:id>
<em:version>1.0</em:version>
<em:type>2</em:type>
<!-- Angaben zu unterstützten Anwendungsversionen -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>1.5</em:minVersion>
<em:maxVersion>64.*</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Sichtbare Daten -->
<em:name>sample</em:name>
<em:description>A test extension</em:description>
<em:creator>Your Name Here</em:creator>
<em:homepageURL>http://www.example.com/</em:homepageURL>
</Description>
</RDF>
答案 0 :(得分:0)