manifest.common.json - contains the common manifest fields for chrome and firefox
manifest.firefox.json - contains the firefox specific manifest fields
manifest.chrome.json - contains the chrome specific manifest fields
Create a parcel reporter plugin to merge the manifests. ( the merging is super simple right now, and doesnt support merging nested objects ) at the end of a successful build
Remove 'build' command from the package.json, and introduce a build:chrome and build:firefox commands
Update the hookContent injecting mechanism for firefox
Our current implementation uses the new scripting api, with WORLD set to MAIN. the reason for implementing this is described in #186. but firefox is yet to implement this.
But firefox does not constraint content-scripts with access to extension apis to not access the pages document. ( chrome does this, see #186). So for now we can use the old method of injecting the content script for firefox. when firefox supports the new api & security model, we can switch to the same implementation as chrome.
Changes
Split the combined manifest into 3 files
manifest.common.json
- contains the common manifest fields for chrome and firefoxmanifest.firefox.json
- contains the firefox specific manifest fieldsmanifest.chrome.json
- contains the chrome specific manifest fieldsCreate a parcel reporter plugin to merge the manifests. ( the merging is super simple right now, and doesnt support merging nested objects ) at the end of a successful build
Remove 'build' command from the package.json, and introduce a
build:chrome
andbuild:firefox
commandsUpdate the hookContent injecting mechanism for firefox
Our current implementation uses the new scripting api, with
WORLD
set toMAIN
. the reason for implementing this is described in #186. but firefox is yet to implement this.But firefox does not constraint content-scripts with access to extension apis to not access the pages document. ( chrome does this, see #186). So for now we can use the old method of injecting the content script for firefox. when firefox supports the new api & security model, we can switch to the same implementation as chrome.