diff options
author | Einar Egilsson <einar@einaregilsson.com> | 2017-11-22 21:48:05 +0000 |
---|---|---|
committer | Einar Egilsson <einar@einaregilsson.com> | 2017-11-22 21:48:05 +0000 |
commit | daa74a164f24e3850c30018626547921e7a3f23c (patch) | |
tree | 9eb7140b91530d3afc27505c20018a5d3e7c53a5 /js/popup.js | |
parent | 31fc24fdf7220be8147ff8e0e9a8f33af0b43880 (diff) |
Logging setting
Diffstat (limited to 'js/popup.js')
-rw-r--r-- | js/popup.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/popup.js b/js/popup.js index 0467286..6658fc0 100644 --- a/js/popup.js +++ b/js/popup.js @@ -14,6 +14,20 @@ angular.module('popupApp', []).controller('PopupCtrl', ['$scope', function($s) { $s.disabled = !obj.disabled; $s.$apply(); }); + }; + + + storage.get({logging:false}, function(obj) { + $s.logging = obj.logging; + $s.$apply(); + }); + + $s.toggleLogging = function() { + storage.get({logging:false}, function(obj) { + storage.set({logging:!obj.logging}); + $s.logging = !obj.logging; + $s.$apply(); + }); }; $s.openRedirectorSettings = function() { |