##// END OF EJS Templates
cleanup: removing unused checkBrowserStatus function
lisaq -
r834:07f543fe default
parent child Browse files
Show More
@@ -53,23 +53,6 b''
53 53 $('#live-notifications')[0].checked = event.detail.response;
54 54 };
55 55
56 function checkBrowserStatus(){
57 var browserStatus = 'Unknown';
58
59 if (!("Notification" in window)) {
60 browserStatus = 'Not supported'
61 }
62 else if(Notification.permission === 'denied'){
63 browserStatus = 'Denied';
64 $('.flash_msg').append('<div class="alert alert-error">Notifications are blocked on browser level - you need to enable them in your browser settings.</div>')
65 }
66 else if(Notification.permission === 'granted'){
67 browserStatus = 'Allowed';
68 }
69
70 $('#browser-notification-status').text(browserStatus);
71 }
72
73 56 ctrlr.testNotifications = function(event){
74 57 var levels = ['info', 'error', 'warning', 'success'];
75 58 var level = levels[Math.floor(Math.random()*levels.length)];
General Comments 0
You need to be logged in to leave comments. Login now