202
edits
(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 | 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 | 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 == |
edits