EmbyCrackedClient/web/modules/serviceworker/notifications.js
2025-06-25 11:46:04 +08:00

1 line
No EOL
525 B
JavaScript

function executeAction(action,data,serverId){return"restartserver"===action&&globalThis.ConnectionManager.getApiClient(serverId).restartServer(),Promise.resolve()}globalThis.addEventListener("notificationclick",function(event){var notification=event.notification,notification=(notification.close(),notification.data),action=event.action;action?event.waitUntil(executeAction(action,notification,notification)):(clients.openWindow("/"),event.waitUntil(Promise.resolve()))},!1),globalThis.addEventListener("push",function(e){});