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 {
|
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 {
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue