aboutsummaryrefslogtreecommitdiff
path: root/js/popup.js
diff options
context:
space:
mode:
authorEinar Egilsson <einar@einaregilsson.com>2018-08-17 10:41:58 +0000
committerGitHub <noreply@github.com>2018-08-17 10:41:58 +0000
commit506f78a13124fdbe5e33485dbd0b079cd8fffd47 (patch)
tree0e269965cc77f6b78c4b8821c910518c259ab414 /js/popup.js
parent005cdf5953a165c5f117102382cd38ecb641fa2f (diff)
parent12c3df39097905f981a392dceaa93ac879813159 (diff)
Merge pull request #120 from gkrishnaks/master
Typo correction in variable declaration, and closes feature requests #104, #86, #72 and fix for issue #115, updated excludeMatch() for faster regex check.
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