Browse Source

properly set global scope visual when default scope is global

pull/2/head
gorhill 7 years ago
parent
commit
f2bb21f129
No known key found for this signature in database GPG Key ID: 25E1490B761470C2
  1. 8
      src/js/popup.js

8
src/js/popup.js

@ -1174,11 +1174,11 @@ function initScopeCell() {
function updateScopeCell() { function updateScopeCell() {
var specificScope = uDom.nodeFromId('specificScope'), 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); 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( node.classList.toggle(
'on', 'on',
!isGlobal && !isGlobal &&

Loading…
Cancel
Save