Closed lucacasonato closed 4 years ago
There is no .prettierrc file or similar included, so I formatted it in a way that seemed to fit most. If there is a .prettierrc file anywhere that belongs to this it would be nice if this was added to the repo.
I think the old command install-for-chrome-ext
should be aliased to the new one, even if it gets a deprecated warrning.
@kylecarbs Could you please review this?
@kylecarbs
Working on this in a new PR.
Adding support for Firefox to the extension is relatively simple because both Chrome and Firefox use the WebExtensions API. In our case this means that the same code will work as long as you place the native host manifests into the correct directory for Firefox. I added this to the extension setup command.
Annoyingly Firefox handles its Content Security Policy differently to Chrome for extensions (https://bugzilla.mozilla.org/show_bug.cgi?id=1267027). In a nutshell this means that we can not call
ws://127.0.0.1:XXXXX/api/v1/run
from the content script itself. This means that the ws needs to be opened in the background script, which can then proxy messages to the content script. I have implemented this too.I also changed the command to setup the native host manifests to
sail setup-extension
(because it does both Chrome and Firefox).