aboutsummaryrefslogtreecommitdiff
path: root/js/popup.js
diff options
context:
space:
mode:
authorGokulakrishna <gokulakrishnaks@gmail.com>2018-05-20 11:13:13 +0530
committerGokulakrishna <gokulakrishnaks@gmail.com>2018-05-20 11:13:21 +0530
commitd9d3600be3cf3aff551e5a8e4acb38239a0507be (patch)
treee940ecdb2db6a509f7ec0ee8b4c322050038762e /js/popup.js
parentd44b612964ef4890bbb766816d484c45cc2d71a8 (diff)
Notifications for successful redirects. Closes #72 feature request
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