WebExtensions/Applications: Difference between revisions

Jump to navigation Jump to search
no edit summary
(→‎Extra file: propose the filename manifest-mozilla so that it sorts better in a web extension directory)
No edit summary
Line 4: Line 4:


Let's enable the running of WebExtensions add-ons built for Chrome with zero modification in Firefox.
Let's enable the running of WebExtensions add-ons built for Chrome with zero modification in Firefox.
'''Update: a few things have changed and some people came up with a much better plan that does not involve using mozilla.json, this was updated to reflect this.'''


== Bugs, bugs ==
== Bugs, bugs ==
Line 31: Line 33:
Because now all add-ons, be them hosted on AMO or hosted on a developers site have to go through AMO and be signed we now have the option to help developers out and do this for them. In the past this wouldn't have been possible.
Because now all add-ons, be them hosted on AMO or hosted on a developers site have to go through AMO and be signed we now have the option to help developers out and do this for them. In the past this wouldn't have been possible.


== Extra file ==
== Rename field ==


Move extra data into a file. Could be called mozilla.json, manifest-mozilla.json, applications.json, or whatever (to make this easier I've called it mozilla.json from here on). That file is optional and should never be required. If it exists then AMO could use that file to populate data such as the add-on id.
Rename the field to *browser_specific_settings*, this is part of the first proposal for a standard for WebExtensions that will be discussed by the W3C group. If other browser support this key, then we can hope Chrome will start to ignore this key and not raise a warning in Chrome.


Add-on developers could keep track of their add-on along with add-on if they so with, but it won't interfere with the basic operation of the add-on.
Add-on developers could keep track of their add-on along with add-on if they so with, but it won't interfere with the basic operation of the add-on.
The field is optional, developers can use it if they want to specify their add-on id in advance (for example if they are upgrading an old add-on to WebExtensions). Otherwise they can ignore it.


== Signing ==
== Signing ==
Line 43: Line 47:
** if an add-on id exists, use it for the add-on
** if an add-on id exists, use it for the add-on
** continue
** continue
* see if applications > id exists in mozilla.json
* see if browser_specific_settings > id exists in manifest.json
** if an add-on id exists, use it for the add-on
** if an add-on id exists, use it for the add-on
** continue
** continue
* generate a new add-on id
* generate a new add-on id, add it to the AMO table for that add-on
** generate a mozilla.json file in the add-on
** ..or we might have to update a mozilla.json if one already exists
** assign the add-on on AMO to that guid
** continue


The add-on developer can find their add-on id a couple of ways:
The add-on developer can find their add-on id by:
* by accessing AMO and finding out
* by accessing AMO and finding out
* by looking at mozilla.json in the signed add-on
* using the API?
* ... should we do more here?


== Loading in Firefox ==
== Loading in Firefox ==
Line 62: Line 63:
** if an add-on id exists, use it for the add-on
** if an add-on id exists, use it for the add-on
** continue  
** continue  
* see if applications > id exists in mozilla.json
* see if specific > id exists in manifest.json
** if an add-on id exists, use it for the add-on
** if an add-on id exists, use it for the add-on
** continue
** continue
* if the add-on is signed
** the add-on is contained in the signing in the CN field? (should check that) of the signature
** user that and continue
* if the add-on id is not found and the add-on is being temporarily loaded through about:debugging
* if the add-on id is not found and the add-on is being temporarily loaded through about:debugging
** generate a random add-on id
** generate a random add-on id
Line 88: Line 92:
== Validator ==
== Validator ==


We'd have to alter the validator with the changes to the files and make the applications and mozilla.json optional.
We'd have to alter the validator make applications and *browser_specific_settings*.
 


= Out of scope =
= Out of scope =
Confirmed users
1,158

edits

Navigation menu