Skip to content
YUKI "Piro" Hiroshi edited this page Feb 23, 2018 · 22 revisions

At first prepare required environment, Node.js LTS. On Linux (I'm using Ubuntu and Debian), n seems the easiest way like:

$ sudo apt install nodejs npm
$ sudo npm install -g n
$ sudo n lts
$ sudo apt remove nodejs npm
$ sudo ln -s /usr/local/bin/node /usr/bin/node

On Windows, you just need to install the version from the installer.

Next, clone this modified version, then build it. On Linux:

$ cd /tmp
$ git clone https://github.com/piroor/web-ext.git
$ cd web-ext
$ git checkout for-dogfooding
$ npm install .
$ node_modules/.bin/grunt build
$ sudo npm install -g .

On Windows:

> cd %temp%
> git clone https://github.com/piroor/web-ext.git
> cd web-ext
> git checkout for-dogfooding
> npm install .
> node_modules\.bin\grunt build
> npm install -g .

And you need to apply a patch for firefox-client/lib/client.js to use existing profile with many tabs (see also an issue I filed at firefox-client and web-ext). For example, on Ubuntu:

$ find /usr/local/lib/node_modules -path '*/firefox-client/lib/client.js' | while read client_js; do if ! grep tabListChanged $client_js; then sudo sed -r -i -e 's/(var unsolicitedEvents = \{)/\1"tabListChanged":"tabListChanged",/' $client_js; fi; done

On Windows you'll need to update two files %AppData%\npm\node_modules\web-ext\node_modules\firefox-client\lib\client.js and %AppData%\npm\node_modules\web-ext\node_modules\node-firefox-connect\node_modules\firefox-client\lib\client.js.

Now you can run Firefox with multiple addons from their source, with static profile.

$ web-ext run --firefox=/full/path/to/firefox \
              --firefox-profile=/full/path/to/your/profile \
              --keep-profile-changes-completely \
              --allow-remote \
              --source-dir=/full/path/to/addon1,/full/path/to/addon2,/full/path/to/addon3

Note that you need to specify all paths as full paths.

Clone this wiki locally