From 364d2985db52e09e0e047c128fe860389eaad5a6 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 21 Nov 2017 11:57:41 -0500 Subject: [PATCH] minor code review --- src/css/popup.css | 2 +- src/js/popup.js | 2 +- src/popup.html | 12 ++---------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/css/popup.css b/src/css/popup.css index 5d75cf7..48f1b55 100644 --- a/src/css/popup.css +++ b/src/css/popup.css @@ -311,7 +311,7 @@ body .toolbar #specificScope > span:first-of-type { flex: 1; } body .toolbar #globalScope { - margin-left: 0 0 0 1px; + margin-left: 1px; text-align: center; width: 2em; } diff --git a/src/js/popup.js b/src/js/popup.js index 8262569..f86a4d2 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -1053,7 +1053,7 @@ function selectGlobalScope() { function selectSpecificScope(ev) { var newScope = ev.target.getAttribute('data-scope'); - if ( matrixSnapshot.scope === newScope ) { return; } + if ( !newScope || matrixSnapshot.scope === newScope ) { return; } document.body.classList.remove('globalScope'); matrixSnapshot.scope = newScope; matrixSnapshot.tMatrixModifiedTime = undefined; diff --git a/src/popup.html b/src/popup.html index 64f4b3e..2f8fb86 100644 --- a/src/popup.html +++ b/src/popup.html @@ -3,7 +3,7 @@ - + uMatrix panel @@ -22,16 +22,8 @@ uMatrix
- -