Posts

Showing posts from April, 2017

Best npm and javascript libraries for extensions

Javascript libraries jquery, jquery-ui : well-known DOM manipulation functions and widgets. Don't forget to include minified version in your addon structure ! materialize, bootstrap: adopt a standard look&feel for your addons. underscore:widely used library to manipulate collections and arrays. Streamline your code ! TLD: url analysis library, allows to dissect urls and separate the various components of a url. NPM modules Despite the fact that most js libraries can be webified for internal addon usage, I mainly use npm modules for my build environment:  after testing grunt, I've adopted gulp for the readability and compactness of the build scripts. I have validated and I'm using the following modules on a daily basis: gulp-vinyl-zip: package all addon files into a single zip file for Chrome store advertisement. crx : package all addon files into a crx file for Chrome firefox-xpi: to package all addon files into a single xpi file for AMO store a

Where are we with Microsoft Edge ?

Customers are very interested with the availability of addons on  Edge and the necessary adjustments to bring to the existing chrome/FF extensions for running them in this new environment. At the time we speak i.e. April,2017, I could collect the following facts from various sources : Edge is strictly available on Windows10 (it requires platform APIs which not available in previous versions). This will slow down the adoption of the browser for some times. Existing Chrome (or webExtensions based FF) extensions can be transparently ported thru two scripts provided by Microsoft ( https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/porting-chrome-extensions ) Note:  not so transparent since the porting involves 2 new JS files called "backgroundScriptsAPIBridge.js" and "contentScriptsAPIBridge.js" ... Windows Store already includes several known extensions (lastPass, ghostery etc...). Publication method is available but does not cover Edge. 

WebExtensions : the converged future of browser addons

Firefox since FF48 is now proposing the Webextension API which allow to reuse chrome code and APIs with little changes making chrome addons code "99% compatible" with Firefox. Note that Edge the last Windows browser also accepts chrome-like APIs. Hints: - there are a couple of modifications that still need to be brought to the chrome addon repo to make them totally usable in the Firefox context: 1/ locales 2/ manifest.json 2.1 gecko id This one is required by the AMO website to allow registration. Firefox contrary to Chome uses a string id to uniquely identify an addon. 2.2 gecko update_url Don't forget to set this property if you don't host your addon on the AMO site ! 2.3 web_available_resources The chrome manifest file admits wildcards for making resource available, this is not the case for Firefox where you have to explicit mention file names. 3/ some APIs like "notifications" claimed as supported by Firefox