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