mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Fix class collision
This commit is contained in:
parent
e55811bbf9
commit
f6048a0804
2 changed files with 12 additions and 12 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue