I never worked with browser technology (firefox). I am an absolute beginner and only come to this topic because I want to create a private ad blocker for my newspaper reading. I was able to block some things via the userContent.css, but you can't get rid of the reloaded - randomly generated - IDs, css class names and scripts. Hence the attempt via uc.js for there I could combine it with some other features like custom NewTabURL etc. (https://github.com/xiaoxiaoflood/firefox-scripts/tree/master/chrome/utils)
But to be able to use content_scripts in uc.js they would have to be 'added' into uc.js.
So it seems that the locale manifest.json which seems to be read and converted into the install.rdf has to be modified ... see in https://github.com/xiaoxiaoflood/firefox-scripts/blob/master/chrome/utils/BootstrapLoader.jsm in line 230 :
let manifestData = await pkg.readString('install.rdf');
let manifest = InstallRDF.loadFromString(manifestData).decode();
... but where is this locale (line 198), which is read here ... I cannot find it ... is it packed somewhere???
function readLocale(aSource, isDefault, aSeenLocales) {
let locale = {};
if (!isDefault) {
locale.locales = [];
for (let localeName of aSource.locales || []) {
if (!localeName) {
logger.warn('Ignoring empty locale in localized properties');
continue;
}
Or does someone know how to bind content_scripts after the (for me) not findable manifest.json is converted into the install.rdf in the BootstrapLoader.jsm in line 178 :
var BootstrapLoader = {
name: 'bootstrap',
manifestFile: 'install.rdf',
async loadManifest(pkg) {
Best thanks Axel