diff options
author | Liam <liamthekerr@gmail.com> | 2022-09-27 16:37:24 -0400 |
---|---|---|
committer | Liam <liamthekerr@gmail.com> | 2022-09-27 16:37:24 -0400 |
commit | 981fe9c4a3994bb42ea5ff5212e4fe53b748bdd9 (patch) | |
tree | 80fd53962ccafeb773b2d43b178e1ee39ac03ca3 /javascript/notification.js | |
parent | 5034f7d7597685aaa4779296983be0f49f4f991f (diff) | |
parent | f2a4a2c3a672e22f088a7455d6039557370dd3f2 (diff) |
Merge remote-tracking branch 'upstream/master' into token_count
Diffstat (limited to 'javascript/notification.js')
-rw-r--r-- | javascript/notification.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/javascript/notification.js b/javascript/notification.js index e8159a7e..bdf614ad 100644 --- a/javascript/notification.js +++ b/javascript/notification.js @@ -25,6 +25,9 @@ onUiUpdate(function(){ lastHeadImg = headImg; + // play notification sound if available + gradioApp().querySelector('#audio_notification audio')?.play(); + if (document.hasFocus()) return; // Multiple copies of the images are in the DOM when one is selected. Dedup with a Set to get the real number generated. |