js optimizations

This commit is contained in:
Vladimir Mandic
2023-06-05 14:25:57 -04:00
parent c52fb69dde
commit efbe364f7d
30 changed files with 697 additions and 70 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
let lastHeadImg = null;
let notificationButton = null;
onUiUpdate(function () {
onAfterUiUpdate(function () {
if (!notificationButton) {
notificationButton = gradioApp().getElementById('request_notifications');
if (notificationButton) notificationButton.addEventListener('click', (evt) => Notification.requestPermission(), true);