aboutsummaryrefslogtreecommitdiffstats
path: root/javascript/notification.js
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-07-08 13:50:23 +0000
committerGitHub <noreply@github.com>2023-07-08 13:50:23 +0000
commit993dd9a8927407de8d19142cacb07e6f76686a67 (patch)
tree89df31c33ecf054c9cb70aaf38fc3382f306f450 /javascript/notification.js
parentff6acd35d0807a4e0c3ee86cdb1520a4a3a11cdd (diff)
parentd7d6e8cfc8b85a99a48f82975ee213d487783c28 (diff)
downloadstable-diffusion-webui-gfx803-993dd9a8927407de8d19142cacb07e6f76686a67.tar.gz
stable-diffusion-webui-gfx803-993dd9a8927407de8d19142cacb07e6f76686a67.tar.bz2
stable-diffusion-webui-gfx803-993dd9a8927407de8d19142cacb07e6f76686a67.zip
Merge branch 'dev' into patch-1
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..76c5715d 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')
+onAfterUiUpdate(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();
};