fix "enable push notifications" button not working in chat

master
Aevann 2023-08-09 18:33:58 +03:00
parent 028a92162b
commit bcbb9de669
1 changed files with 3 additions and 3 deletions

View File

@ -486,7 +486,7 @@ function handle_files(input, newfiles) {
if (input.files.length > 20) if (input.files.length > 20)
{ {
alert("You can't upload more than 20 files at one time!") window.alert("You can't upload more than 20 files at one time!")
input.value = null input.value = null
oldfiles[ta.id] = new DataTransfer(); oldfiles[ta.id] = new DataTransfer();
return return
@ -686,9 +686,9 @@ function enablePushNotifications() {
}) })
}).then((subscription) => { }).then((subscription) => {
updateSubscriptionOnServer(subscription, "/push_subscribe") updateSubscriptionOnServer(subscription, "/push_subscribe")
alert("Push notifications are enabled!") window.alert("Push notifications are enabled!")
}).catch((e) => { }).catch((e) => {
alert("Please give the site access to notifications!") window.alert("Please give the site access to notifications!")
console.error(e) console.error(e)
}) })
} }