diff --git a/web/templates/account/settings.html b/web/templates/account/settings.html index 68ee054..b833302 100644 --- a/web/templates/account/settings.html +++ b/web/templates/account/settings.html @@ -1563,7 +1563,7 @@ window.addEventListener("DOMContentLoaded", (event) => { $pushDeniedHelp = document.querySelector("#push-denied-help"); // Is the Notification API unavailable? - if (typeof(window.Notification) === "undefined") { + if (typeof(window.Notification) === "undefined" || typeof(PushNotificationSubscribe) === "undefined") { $pushStatusDefault.innerHTML = ` Notification API unavailable`; $pushStatusDefault.style.display = ""; return; diff --git a/web/templates/base.html b/web/templates/base.html index bbc56a0..3ede998 100644 --- a/web/templates/base.html +++ b/web/templates/base.html @@ -381,7 +381,10 @@ - + {{if not .SessionImpersonated -}} + {{- /* Disable web push script if impersonated, so an admin doesn't subscribe to user's notifications */ -}} + + {{- end}} {{template "scripts" .}}