From f6048a08040dd503c5bfea07fd68f1fc166b6bee Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 3 Jan 2026 09:21:10 -0500 Subject: [PATCH] [mv3] Fix class collision --- platform/mv3/extension/css/settings.css | 2 +- .../mv3/extension/js/filter-manager-ui.js | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/platform/mv3/extension/css/settings.css b/platform/mv3/extension/css/settings.css index b1cb4b067..5c9a2462f 100644 --- a/platform/mv3/extension/css/settings.css +++ b/platform/mv3/extension/css/settings.css @@ -249,7 +249,7 @@ body section[data-pane="filters"] .hostnames { body section[data-pane="filters"] .hostnames:empty { display: none; } -body.busy section[data-pane="filters"] .hostnames { +body.readonly section[data-pane="filters"] .hostnames { pointer-events: none; } section[data-pane="filters"] ul { diff --git a/platform/mv3/extension/js/filter-manager-ui.js b/platform/mv3/extension/js/filter-manager-ui.js index 4303acc73..b8c7dacb9 100644 --- a/platform/mv3/extension/js/filter-manager-ui.js +++ b/platform/mv3/extension/js/filter-manager-ui.js @@ -88,11 +88,11 @@ async function removeSelectorsFromHostname(node) { qsa$(hostnameNode, 'li.selector.removed [contenteditable]') ).map(a => a.dataset.ugly); if ( selectors.length === 0 ) { return; } - dom.cl.add(dom.body, 'busy'); + dom.cl.add(dom.body, 'readonly'); updateContentEditability(); await sendMessage({ what: 'removeCustomFilters', hostname, selectors }); await debounceRenderCustomFilters(); - dom.cl.remove(dom.body, 'busy'); + dom.cl.remove(dom.body, 'readonly'); updateContentEditability(); } @@ -105,11 +105,11 @@ async function unremoveSelectorsFromHostname(node) { qsa$(hostnameNode, 'li.selector:not(.removed) [contenteditable]') ).map(a => a.dataset.ugly); if ( selectors.length === 0 ) { return; } - dom.cl.add(dom.body, 'busy'); + dom.cl.add(dom.body, 'readonly'); updateContentEditability(); await sendMessage({ what: 'addCustomFilters', hostname, selectors }); await debounceRenderCustomFilters(); - dom.cl.remove(dom.body, 'busy'); + dom.cl.remove(dom.body, 'readonly'); updateContentEditability(); } @@ -199,7 +199,7 @@ debounceRenderCustomFilters.debouncer = undefined; /******************************************************************************/ function updateContentEditability() { - if ( dom.cl.has(dom.body, 'busy') ) { + if ( dom.cl.has(dom.body, 'readonly') ) { dom.attr('[contenteditable]', 'contenteditable', 'false'); return; } @@ -228,7 +228,7 @@ async function onHostnameChanged(target, before, after) { return; } - dom.cl.add(dom.body, 'busy'); + dom.cl.add(dom.body, 'readonly'); updateContentEditability(); // Remove old hostname from storage @@ -245,7 +245,7 @@ async function onHostnameChanged(target, before, after) { }); await debounceRenderCustomFilters(); - dom.cl.remove(dom.body, 'busy'); + dom.cl.remove(dom.body, 'readonly'); updateContentEditability(); } @@ -261,7 +261,7 @@ async function onSelectorChanged(target, before, after) { const hostname = hostnameFromNode(target); - dom.cl.add(dom.body, 'busy'); + dom.cl.add(dom.body, 'readonly'); updateContentEditability(); // Remove old selector from storage @@ -279,7 +279,7 @@ async function onSelectorChanged(target, before, after) { }); await debounceRenderCustomFilters(); - dom.cl.remove(dom.body, 'busy'); + dom.cl.remove(dom.body, 'readonly'); updateContentEditability(); } @@ -385,7 +385,7 @@ async function importFromText(text) { if ( hostnameToSelectorsMap.size === 0 ) { return; } - dom.cl.add(dom.body, 'busy'); + dom.cl.add(dom.body, 'readonly'); updateContentEditability(); const promises = []; @@ -400,7 +400,7 @@ async function importFromText(text) { await Promise.all(promises); await debounceRenderCustomFilters(); - dom.cl.remove(dom.body, 'busy'); + dom.cl.remove(dom.body, 'readonly'); updateContentEditability(); }