0

I am trying to install a test Firefox 53 extension.

For testing, I installed via about:debugging with following structure:

clock.png        <-- the 48px icon
manifest.json    <-- some mandatory settings
plugin.js        <-- code

The manifest.json contains

{
  "description": "My test extension",
  "manifest_version": 2,
  "name": "test extension",
  "version": "1.0",
  "homepage_url": "https://github.com/",
  "icons": {
    "48": "clock.png"
  },
  "content_scripts": [
    {
      "matches": ["https://localhost/*"],
      "js": ["plugin.js"]
    }
  ],

    "permissions": [
      "history",
      "browsingData",
        "tabs",
        "<all_urls>",
        "http://localhost/*",
        "storage"
  ]


}

This is working as expected, but every time FF is restarted, I have to re-add manually the extension again.

I started to pack everything in a XPI file.

I start by disableing the FF signed check for extension following this:

https://www.ghacks.net/2016/08/14/override-firefox-add-on-signing-requirement/

I have following structure:

content
    clock.png        <-- the 48px icon
    manifest.json    <-- some mandatory settings
    plugin.js        <-- code
chrome.manifest
install.rdf

The chrome.manifest contains:

content plugin content/
overlay chrome://browser/content/browser.xul

Now finally, I installed the extension with success (no errors) but does nothing! Like not existing. I restarted FF and the same, no errors, the extension is persistent but not working.

What I do wrong? Thanks.

EDITED:

@Makyen and others, please don't mark it as DUPLICATE unless you're absolutely sure the old answers (eg. from 2015) are still relevant.

Firefox extension .xpi file structure: description, contents, creation, and installation

This answer (however, quite complete) is not working anymore in FireFox >= 53.

I tried the simple structure like other old posts:

clock.png        <-- the 48px icon
manifest.json    <-- some mandatory settings
plugin.js        <-- code

zipped, even uncompressed (just store) and FF keep tells that plugin is invalid. However, when installing temporarily via

about:debugging

my plugin is working just perfect.

Seems to be mission impossible and I'd like a "Hello World" example in XPI format, so I can "drag'n'drop" into Firefox 53 and open some alert. Once again, I am not interested to sign anything, security, whatever.

This is for internal use only, why this is so complicated???

Where can I find a simple and complete working XPI example??

Thank you in advance,

user1797147
  • 915
  • 3
  • 14
  • 33
  • Did you pack the extension with the `jpm`? I believe you should just zip it – Christos Papoulas Jul 14 '17 at 07:36
  • No, I packed with Windows default ZIP (works) and 7-ZIP (works too) so actually the extension installs fine (no errors) but does nothing, like not exists. – user1797147 Jul 14 '17 at 08:28
  • WebExtensions **do not** use a *chrome.manifest*, nor an *install.rdf*. The files that are in your *content* directory should be the only ones in the *.xpi* and should be in the top level directory, not a subdirectory. See: [Firefox extension .xpi file structure: description, contents, creation, and installation](https://stackoverflow.com/a/31043045) – Makyen Jul 19 '17 at 22:19

0 Answers0