Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
m3nadav opened this issue Jul 4, 2024 · 4 comments · May be fixed by #144
Open

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

m3nadav opened this issue Jul 4, 2024 · 4 comments · May be fixed by #144

Comments

@m3nadav
Copy link

m3nadav commented Jul 4, 2024

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
Copy link
Member

gorhill commented Jul 4, 2024

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
Copy link
Author

m3nadav commented Jul 6, 2024

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

@m3nadav
Copy link
Author

m3nadav commented Jul 6, 2024

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
Copy link
Author

m3nadav commented Jul 16, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants