Fix undue unchecking of setting in "My filters"

Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/discussions/2895#discussioncomment-12749154
This commit is contained in:
Raymond Hill 2025-04-08 13:49:41 -04:00
parent d8b29cf1a3
commit 2bb6999e3f
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -97,7 +97,7 @@ function getCurrentState() {
const enabled = qs$('#enableMyFilters input').checked;
return {
enabled,
trusted: enabled && qs$('#trustMyFilters input').checked,
trusted: qs$('#trustMyFilters input').checked,
filters: getEditorText(),
};
}
@ -128,7 +128,6 @@ function userFiltersChanged(details = {}) {
qs$('#userFiltersApply').disabled = !changed;
qs$('#userFiltersRevert').disabled = !changed;
const enabled = qs$('#enableMyFilters input').checked;
dom.attr('#trustMyFilters .input.checkbox', 'disabled', enabled ? null : '');
const trustedbefore = cmEditor.getOption('trustedSource');
const trustedAfter = enabled && qs$('#trustMyFilters input').checked;
if ( trustedAfter === trustedbefore ) { return; }