[mv3] Fix class collision

This commit is contained in:
Raymond Hill 2026-01-03 09:21:10 -05:00
parent e55811bbf9
commit f6048a0804
No known key found for this signature in database
GPG key ID: F5630CAE62A14316
2 changed files with 12 additions and 12 deletions

View file

@ -249,7 +249,7 @@ body section[data-pane="filters"] .hostnames {
body section[data-pane="filters"] .hostnames:empty { body section[data-pane="filters"] .hostnames:empty {
display: none; display: none;
} }
body.busy section[data-pane="filters"] .hostnames { body.readonly section[data-pane="filters"] .hostnames {
pointer-events: none; pointer-events: none;
} }
section[data-pane="filters"] ul { section[data-pane="filters"] ul {

View file

@ -88,11 +88,11 @@ async function removeSelectorsFromHostname(node) {
qsa$(hostnameNode, 'li.selector.removed [contenteditable]') qsa$(hostnameNode, 'li.selector.removed [contenteditable]')
).map(a => a.dataset.ugly); ).map(a => a.dataset.ugly);
if ( selectors.length === 0 ) { return; } if ( selectors.length === 0 ) { return; }
dom.cl.add(dom.body, 'busy'); dom.cl.add(dom.body, 'readonly');
updateContentEditability(); updateContentEditability();
await sendMessage({ what: 'removeCustomFilters', hostname, selectors }); await sendMessage({ what: 'removeCustomFilters', hostname, selectors });
await debounceRenderCustomFilters(); await debounceRenderCustomFilters();
dom.cl.remove(dom.body, 'busy'); dom.cl.remove(dom.body, 'readonly');
updateContentEditability(); updateContentEditability();
} }
@ -105,11 +105,11 @@ async function unremoveSelectorsFromHostname(node) {
qsa$(hostnameNode, 'li.selector:not(.removed) [contenteditable]') qsa$(hostnameNode, 'li.selector:not(.removed) [contenteditable]')
).map(a => a.dataset.ugly); ).map(a => a.dataset.ugly);
if ( selectors.length === 0 ) { return; } if ( selectors.length === 0 ) { return; }
dom.cl.add(dom.body, 'busy'); dom.cl.add(dom.body, 'readonly');
updateContentEditability(); updateContentEditability();
await sendMessage({ what: 'addCustomFilters', hostname, selectors }); await sendMessage({ what: 'addCustomFilters', hostname, selectors });
await debounceRenderCustomFilters(); await debounceRenderCustomFilters();
dom.cl.remove(dom.body, 'busy'); dom.cl.remove(dom.body, 'readonly');
updateContentEditability(); updateContentEditability();
} }
@ -199,7 +199,7 @@ debounceRenderCustomFilters.debouncer = undefined;
/******************************************************************************/ /******************************************************************************/
function updateContentEditability() { function updateContentEditability() {
if ( dom.cl.has(dom.body, 'busy') ) { if ( dom.cl.has(dom.body, 'readonly') ) {
dom.attr('[contenteditable]', 'contenteditable', 'false'); dom.attr('[contenteditable]', 'contenteditable', 'false');
return; return;
} }
@ -228,7 +228,7 @@ async function onHostnameChanged(target, before, after) {
return; return;
} }
dom.cl.add(dom.body, 'busy'); dom.cl.add(dom.body, 'readonly');
updateContentEditability(); updateContentEditability();
// Remove old hostname from storage // Remove old hostname from storage
@ -245,7 +245,7 @@ async function onHostnameChanged(target, before, after) {
}); });
await debounceRenderCustomFilters(); await debounceRenderCustomFilters();
dom.cl.remove(dom.body, 'busy'); dom.cl.remove(dom.body, 'readonly');
updateContentEditability(); updateContentEditability();
} }
@ -261,7 +261,7 @@ async function onSelectorChanged(target, before, after) {
const hostname = hostnameFromNode(target); const hostname = hostnameFromNode(target);
dom.cl.add(dom.body, 'busy'); dom.cl.add(dom.body, 'readonly');
updateContentEditability(); updateContentEditability();
// Remove old selector from storage // Remove old selector from storage
@ -279,7 +279,7 @@ async function onSelectorChanged(target, before, after) {
}); });
await debounceRenderCustomFilters(); await debounceRenderCustomFilters();
dom.cl.remove(dom.body, 'busy'); dom.cl.remove(dom.body, 'readonly');
updateContentEditability(); updateContentEditability();
} }
@ -385,7 +385,7 @@ async function importFromText(text) {
if ( hostnameToSelectorsMap.size === 0 ) { return; } if ( hostnameToSelectorsMap.size === 0 ) { return; }
dom.cl.add(dom.body, 'busy'); dom.cl.add(dom.body, 'readonly');
updateContentEditability(); updateContentEditability();
const promises = []; const promises = [];
@ -400,7 +400,7 @@ async function importFromText(text) {
await Promise.all(promises); await Promise.all(promises);
await debounceRenderCustomFilters(); await debounceRenderCustomFilters();
dom.cl.remove(dom.body, 'busy'); dom.cl.remove(dom.body, 'readonly');
updateContentEditability(); updateContentEditability();
} }