mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-02 02:14:52 +12:00
properly set global scope visual when default scope is global
This commit is contained in:
parent
9d6d27ae21
commit
f2bb21f129
|
@ -1174,11 +1174,11 @@ function initScopeCell() {
|
|||
|
||||
function updateScopeCell() {
|
||||
var specificScope = uDom.nodeFromId('specificScope'),
|
||||
globalScope = uDom.nodeFromId('globalScope');
|
||||
var isGlobal = matrixSnapshot.scope === '*';
|
||||
isGlobal = matrixSnapshot.scope === '*';
|
||||
document.body.classList.toggle('globalScope', isGlobal);
|
||||
specificScope.classList.toggle('on', !isGlobal);
|
||||
globalScope.classList.toggle('on', isGlobal);
|
||||
for ( var node of uDom.nodeFromId('specificScope').children ) {
|
||||
uDom.nodeFromId('globalScope').classList.toggle('on', isGlobal);
|
||||
for ( var node of specificScope.children ) {
|
||||
node.classList.toggle(
|
||||
'on',
|
||||
!isGlobal &&
|
||||
|
|
Loading…
Reference in a new issue