1
0
Fork 0
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:
gorhill 2017-11-26 10:19:47 -05:00
parent 9d6d27ae21
commit f2bb21f129
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -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 &&