aboutsummaryrefslogtreecommitdiff
path: root/javascript/notification.js
diff options
context:
space:
mode:
authormissionfloyd <missionfloyd@users.noreply.github.com>2023-05-25 18:53:33 -0600
committerGitHub <noreply@github.com>2023-05-25 18:53:33 -0600
commit6645f23c4c715b1bc704c88a499b2f4224d7f1e6 (patch)
tree6aeb51e366254fe8993856a3db341690bb39dca5 /javascript/notification.js
parent43bdaa2f0eda79c685792b06a2bd84c65806a48f (diff)
parenta6e653be26cc05f4438145fa0082816e9fbbf5fc (diff)
Merge branch 'dev' into reorder-hotkeys
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();
};