aboutsummaryrefslogtreecommitdiff
path: root/js/popup.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/popup.js')
-rw-r--r--js/popup.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/popup.js b/js/popup.js
index 6658fc0..c27a29f 100644
--- a/js/popup.js
+++ b/js/popup.js
@@ -30,6 +30,23 @@ angular.module('popupApp', []).controller('PopupCtrl', ['$scope', function($s) {
});
};
+
+ //Toggle Notifications by sending a notifications
+ $s.enableNotifications = false;
+
+ storage.get({enableNotifications:false},function(obj){
+ $s.enableNotifications = obj.enableNotifications;
+ $s.$apply();
+ });
+
+ $s.toggleNotifications=function(){
+ storage.get({enableNotifications:false},function(obj){
+ storage.set({enableNotifications:!obj.enableNotifications});
+ $s.enableNotifications = !obj.enableNotifications;
+ $s.$apply();
+ });
+ }
+
$s.openRedirectorSettings = function() {
//switch to open one if we have it to minimize conflicts