A utility that turns regular Firefox-based browsers into Developer Edition

Due to disagreement with the policy of Mozilla and distributions not to distribute builds of Firefox that have unlocked the ability to install unsigned add-ons and use the WebExtensions Experiments API, a tool was developed that converts regular Firefox builds to a "Developer Edition" variant that allows the use of add-ons without a digital signature.

The development of the tool was facilitated by the fact that the desired functionality in Firefox is implemented in ECMAScript code and is included in any Firefox variant, but is enabled at runtime depending on the set values ​​of the constants. The constants ("MOZ_DEV_EDITION", "MOZ_REQUIRE_SIGNING") are defined in a single file ("modules/addons/AddonSettings.jsm"), which is located in the zip archive "/usr/lib/firefox/omni.ja".

The proposed utility parses the required file using esprima-python, patches the AST, and serializes it using jscodegen.py. Working with the zip format is provided by libzip.py - bindings to libzip. These libraries are recommended to be installed manually from the corresponding git repositories.

Additionally, the unpin.py script can be noted, which allows you to unpin the restrictions "{", "==" and "~=" on the version of dependencies in the pre-built wheel format package used by many developers, which allows you to avoid automatic downgrade when installing the desired package via pip when default settings.

Source: opennet.ru

Add a comment