aboutsummaryrefslogtreecommitdiff
path: root/js/popup.js
diff options
context:
space:
mode:
authorEinar Egilsson <einar@einaregilsson.com>2019-12-11 15:06:42 +0000
committerEinar Egilsson <einar@einaregilsson.com>2019-12-11 15:06:42 +0000
commit0fcc8c5e734d5e3ea769c5ef7be9f2200c3aca06 (patch)
treef724e430286791f867cf0c42c039ec362a04eac0 /js/popup.js
parentb53d093463e94096f16f0fd7656fc88d642faa3d (diff)
More fixes after removing angular
Diffstat (limited to 'js/popup.js')
-rw-r--r--js/popup.js21
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...