From d9d3600be3cf3aff551e5a8e4acb38239a0507be Mon Sep 17 00:00:00 2001 From: Gokulakrishna Date: Sun, 20 May 2018 11:13:13 +0530 Subject: Notifications for successful redirects. Closes #72 feature request --- js/popup.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'js/popup.js') 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 -- cgit v1.2.3