aboutsummaryrefslogtreecommitdiff
path: root/javascript/notification.js
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-21 17:37:09 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-05-21 17:37:09 +0300
commit1f3182924ba8e70d0e0fc3ed270782f324376ba3 (patch)
tree27a9e5167e5b981dfe56f5084ea8e1e8743f3fc0 /javascript/notification.js
parent89f9faa63388756314e8a1d96cf86bf5e0663045 (diff)
parentfdaf0147b6d2a5f599464bb7c65817ef5832eff1 (diff)
Merge branch 'dev' into release_candidate
Diffstat (limited to 'javascript/notification.js')
-rw-r--r--javascript/notification.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/javascript/notification.js b/javascript/notification.js
index 83fce1f8..a68a76f2 100644
--- a/javascript/notification.js
+++ b/javascript/notification.js
@@ -4,14 +4,14 @@ let lastHeadImg = null;
let notificationButton = null;
-onUiUpdate(function(){
- if(notificationButton == null){
- notificationButton = gradioApp().getElementById('request_notifications')
+onUiUpdate(function() {
+ if (notificationButton == null) {
+ notificationButton = gradioApp().getElementById('request_notifications');
- if(notificationButton != null){
+ if (notificationButton != null) {
notificationButton.addEventListener('click', () => {
void Notification.requestPermission();
- },true);
+ }, true);
}
}
@@ -42,7 +42,7 @@ onUiUpdate(function(){
}
);
- notification.onclick = function(_){
+ notification.onclick = function(_) {
parent.focus();
this.close();
};