Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions ephios/static/ephios/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,6 @@ $(document).ready(function () {
}
});

// The browser fires the appinstalled event after the PWA has been installed.
// We use this opportunity to ask the user if they want to receive notifications
window.addEventListener('appinstalled', () => {
pwaAndroidBsOffcanvas.hide();
// isPushEnabled is set by webpush.js from django-webpush
if (typeof isPushEnabled !== undefined && !isPushEnabled) {
notificationBsOffcanvas.show();
document.getElementById("webpush-subscribe-button")
.addEventListener("click", _ => notificationBsOffcanvas.hide())
}
deferredInstallPrompt = null;
});

// When the user clicks on the install button in our PWA install prompt, we can used the saved prompt
// from the browser event to actually trigger the installation
const buttonInstall = document.getElementById("pwaInstall");
Expand Down