Implemented in Firefox an experimental API in WebExtensions to edit about: config

firefox-logo

An external developer has implemented an experimental API to provide to Web Extensions the capacity of edit the configuration available via "about: config" in Firefox-based browsers.

The API can be useful for creating tweaker extensions that provide a more user-friendly browser customization interface. In the same repository, 2 extensions are provisioned using the forwarded API, which can serve as an example.

To get access to the API, the following conditions must be met:

  • Use a version of Firefox with the ability to run unsigned extensions (Mozilla does not essentially sign extensions that use WebExtensions Experiments) and activate this mode through "xpinstall.signatures.required".
  • Using a version of Firefox with the ability to use WebExtensions Experiments (Requires compilation with the macro definition "MOZ_DEV_EDITION". Of the official versions, these are Nightly and Developer Edition). This mode is activated by "extensions.experiments.enabled".
  • The presence of an installed extension that forwards the API. It is located in the "experiments" directory. It also contains a file that describes and documents the current version of the WebExtensions API for editing "about: config". In the future, it is planned to implement limiting the available parameters for a specific API user extension by declaring them in the manifest.
  • To work with the API, you must specify the "experiment.config" permission in your extension manifest.

It should be noted that the dynamic granting (with the possibility of the user opting out) of permissions to access experimental APIs does not work in Firefox at this time.

Furthermore, it is mentioned that an extension is provided in the "arkenfox" directory that synchronizes the browser settings with the list of recommended settings for the arkenfox project (formerly known as ghacksuserjs, but renamed because the project has been developing for a long time in isolation from the Ghacks technology news site). When installed, a button appears on the toolbar, when that opens a list of configurations, whose values ​​do not match the values ​​in arkenfox / user.js. In front of each difference there is a button, clicking on which the difference is eliminated. All differences can be removed with one click.

For the extension to work from the "arkenfox" directory, another experimental API is required, webext-experiment-parse, who allows to use the ECMAScript parser resources built-in SpiderMonkey, rather than using parsers implemented in ECMAScript itself, such as ESPrima, to provide better performance and more importantly, eliminate the need to submit and update this dependency.

No measurement and comparison was made, it is very possible that the overhead of sending messages eats everything, in a friendly way so as not to eat it you have to forward it out of the box, but at the moment Mozilla is generally against forwarding this API, since They do not guarantee the stability of the returned AST format.

However, it is possible to work without the specified extension, with a support for a primitive parser based on regular expressions. To do this, you need to rebuild the "arkenfox" extension, removing the "experiments".

The "unlock" extension simply unlocks all locked settings at the time of its initialization. The locked configurations are those that the user cannot change through "about: config".

Since the custom configuration file is read at startup before the extensions are initialized, changes to the configuration locked between reboots are not saved. If it is necessary to 'clear' the locked setting value in the early stages of commissioning, you can lock it to another value according to the instructions.

To create extensions, you just need to compress your files into zip files uncompressed with the xpi extension. As a reminder, Mozilla did not deliberately implement editing the about: config configuration in the form of the WebExtensions API.

Finally, for those who are interested in having access to the API, they can consult the following repository where you will find everything mentioned.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.