mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-31 12:23:48 +01:00
Fix Notification.requestPermission on first run
This commit is contained in:
parent
30c4f7ed41
commit
647c0618ce
@ -58,7 +58,11 @@ $(document).ready(function(){
|
||||
var setting = $(this).parent().attr('id');
|
||||
|
||||
if ($(this).is(':checked')) {
|
||||
Notification.requestPermission();
|
||||
Notification.requestPermission(function(permission){
|
||||
if (permission === "granted") {
|
||||
localStorage[setting] = 'true';
|
||||
}
|
||||
});
|
||||
if (Notification.permission === "granted") {
|
||||
localStorage[setting] = 'true';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user