uBlockOrigin / uBOL-home

uBO Lite home (MV3)
GNU General Public License v3.0
781 stars 32 forks source link

Pre-enabled rulesets in manifest.json are being disabled by `defaultRulesetsFromLanguage` #143

Open m3nadav opened 1 month ago

m3nadav commented 1 month ago

During the installation of the extension, the defaultRulesetsFromLanguage function uses a hard-coded out containing the default ruleset only (on ruleset-manager.js:437) so any enabled ruleset from the manifest.json that is not "default" and the language default is being disabled during installation

To fix this, that line should be

const out = await dnr.getEnabledRulesets();

I will open a PR on this repo hoping that's the way to contribute to this version of uBO 🙏

gorhill commented 1 month ago

There is only one enabled ruleset by default, the default one.


Also, the source code in uBOL is generated from a build script at https://github.com/gorhill/uBlock/tree/master/platform/mv3, so any change in the code needs to be done there. But as said there is only one ruleset enabled by default -- I don't plan to change this.

m3nadav commented 1 month ago

Is there another way to control what lists are enabled that is not through the extension UI?

m3nadav commented 1 month ago

I just noticed I haven't given any context - I'd like to manually install the extension on multiple browsers and enable specific lists as part of the installation

The PR I opened just to manually control the enabled lists using the manifest.json file, but doesn't change the current defaults

m3nadav commented 1 month ago

@gorhill I'd appreciate your comment on this I can't open a PR to the main repository as it is limited for users that have contributed to that repository in the past The change I propose does not change the default filter lists, it just uses the already declared defaults as input during the installation process, as can be seen here:

image

Appreciate your work, and hope to be able to contribute to it