diff options
author | Einar Egilsson <einar@einaregilsson.com> | 2019-12-11 15:06:42 +0000 |
---|---|---|
committer | Einar Egilsson <einar@einaregilsson.com> | 2019-12-11 15:06:42 +0000 |
commit | 0fcc8c5e734d5e3ea769c5ef7be9f2200c3aca06 (patch) | |
tree | f724e430286791f867cf0c42c039ec362a04eac0 /js/popup.js | |
parent | b53d093463e94096f16f0fd7656fc88d642faa3d (diff) |
More fixes after removing angular
Diffstat (limited to 'js/popup.js')
-rw-r--r-- | js/popup.js | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/js/popup.js b/js/popup.js index 36d0685..8ac707c 100644 --- a/js/popup.js +++ b/js/popup.js @@ -15,10 +15,7 @@ function toggle(prop) { }); } -storage.get({logging:false, enableNotifications:false, disabled: false}, function(obj) { - viewModel = obj; - applyBinding(); -}) + function openRedirectorSettings() { @@ -41,3 +38,19 @@ function openRedirectorSettings() { }); return; }; + + +function pageLoad() { + storage.get({logging:false, enableNotifications:false, disabled: false}, function(obj) { + viewModel = obj; + applyBinding(); + }) + + el('#enable-notifications').addEventListener('input', () => toggle('enableNotifications')); + el('#enable-logging').addEventListener('input', () => toggle('logging')); + el('#toggle-disabled').addEventListener('click', () => toggle('disabled')); + el('#open-redirector-settings').addEventListener('click', openRedirectorSettings); +} + +pageLoad(); +//Setup page... |