Browse Source
properly set global scope visual when default scope is global
pull/2/head
gorhill
7 years ago
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with
4 additions and
4 deletions
-
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 && |
|
|