cleanup: removing unused checkBrowserStatus function
This commit is contained in:
parent
82972c9807
commit
06ed5e2779
1 changed files with 0 additions and 17 deletions
|
|
@ -53,23 +53,6 @@
|
|||
$('#live-notifications')[0].checked = event.detail.response;
|
||||
};
|
||||
|
||||
function checkBrowserStatus(){
|
||||
var browserStatus = 'Unknown';
|
||||
|
||||
if (!("Notification" in window)) {
|
||||
browserStatus = 'Not supported'
|
||||
}
|
||||
else if(Notification.permission === 'denied'){
|
||||
browserStatus = 'Denied';
|
||||
$('.flash_msg').append('<div class="alert alert-error">Notifications are blocked on browser level - you need to enable them in your browser settings.</div>')
|
||||
}
|
||||
else if(Notification.permission === 'granted'){
|
||||
browserStatus = 'Allowed';
|
||||
}
|
||||
|
||||
$('#browser-notification-status').text(browserStatus);
|
||||
}
|
||||
|
||||
ctrlr.testNotifications = function(event){
|
||||
var levels = ['info', 'error', 'warning', 'success'];
|
||||
var level = levels[Math.floor(Math.random()*levels.length)];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue