Removing notifications completely from safari
This commit is contained in:
@@ -73,6 +73,9 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
notificationAllowed: function() {
|
||||
if (!("PushManager" in window)) {
|
||||
return false;
|
||||
}
|
||||
return (
|
||||
Notification.permission !== "granted" ||
|
||||
!this.pushAllowed ||
|
||||
|
||||
@@ -4,8 +4,10 @@ var serviceWorkerRegistrationMixin = {
|
||||
console.log("Nettleseren din støtter ikke service-workers.");
|
||||
return;
|
||||
}
|
||||
if (Notification.permission !== "granted") {
|
||||
localStorage.removeItem("push");
|
||||
if ("PushManager" in window) {
|
||||
if (Notification.permission !== "granted") {
|
||||
localStorage.removeItem("push");
|
||||
}
|
||||
}
|
||||
this.registerPushListener();
|
||||
this.registerServiceWorker();
|
||||
|
||||
Reference in New Issue
Block a user