Hey guys!
While creating a couple of extensions I had to write code double and tripple for different platforms. Mainly for firefox and chrome. What I ended up doing was building something on top of the browser api and swap that out during build. But I wasn’t fully happy with that solution since it still required a lot of manual work.
Because of that, I started a small weekend project called ‘exkit’ (Extension Kit).
Exkit is a small framework that is doing exactly what I explained above, but fully automatic without the user having to interfere. It tries to uniform the firefox, chrome and opera extension api into a single exkit api. Exkit goes a step further and even unifies stuff that is usually only available through the manifest.json / package.json of the browser.
As an example, adding ‘browserAction’ into the exkit.json (a chrome specific manifest.json key) will add a browser button in all 3 browsers, including firefox.
Exkit uses mozillas addon/jetpack SDK and also gives you es6 features during compile (powered by babel)\
Check out the example here - https://github.com/dvcrn/exkit/tree/master/example
Or the readme here - https://github.com/dvcrn/exkit
I would love to hear some feedback on this. What do you guys think?
If you like it, I really appreciate support to implement more stuff. Right now all that works is attaching page-workers, events, browserActions (with clicks) and a api to open tabs.