Compatibility/System Addon/Override Policies and Workflows: Difference between revisions

Jump to navigation Jump to search
Refactorings happened
(Also change the registration location for CSS injections)
(Refactorings happened)
Line 38: Line 38:
==== Technical details ====
==== Technical details ====


User agent overrides are defined within [https://github.com/mozilla/webcompat-addon/blob/master/src/content/data/ua_overrides.jsm src/content/data/ua_overrides.jsm] of the addon sources. In this file, you will only find an array containing all active user agent overrides. Each object can have three attributes:
User agent overrides are defined within [https://github.com/mozilla/webcompat-addon/blob/master/src/data/ua_overrides.js src/data/ua_overrides.js] of the addon sources. In this file, you will only find an array containing all active user agent overrides. Each object can have three attributes:


* ''baseDomain'', required: The base domain that further checks and user agents override are applied to. This does not include subdomains.
* ''baseDomain'', required: The base domain that further checks and user agents override are applied to. This does not include subdomains.
Line 106: Line 106:
JS injections are defined within individual files within the [https://github.com/mozilla/webcompat-addon/blob/master/src/webextension/injections/js/ src/webextension/injections/js/] directory of the addon sources. In this folder, you will find a collection of files, one file per override or injection. For easier cross-reference, please stick to the ''bugNNNNN-short-description.js'' file name schema.
JS injections are defined within individual files within the [https://github.com/mozilla/webcompat-addon/blob/master/src/webextension/injections/js/ src/webextension/injections/js/] directory of the addon sources. In this folder, you will find a collection of files, one file per override or injection. For easier cross-reference, please stick to the ''bugNNNNN-short-description.js'' file name schema.


In addition, the injection file has to be registered in the constant array located at the top of [https://github.com/mozilla/webcompat-addon/blob/master/src/webextension/background.js#L7 src/webextension/background.js]. Details on available parameters can be found [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/content_scripts in the MDN web docs].
In addition, the injection file has to be registered in the array located in [https://github.com/mozilla/webcompat-addon/blob/master/src/data/injections.js rc/data/injections.js]. Details on available parameters can be found [https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/content_scripts in the MDN web docs].


== Open points for further discussion ==
== Open points for further discussion ==
202

edits

Navigation menu