diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-09-27 06:57:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-27 06:57:16 +0000 |
commit | dbe072dcffd20c1d17d25b0cdde765cb9e7c74aa (patch) | |
tree | 34ee857142e1143ee3588eaf4a597fc207ce999d /javascript | |
parent | adbd26a68ff3e4fdfd410859048a3b12f2d80ff6 (diff) | |
parent | e4145c84537b563a4b0ad7d225764f8c446479b5 (diff) | |
download | stable-diffusion-webui-gfx803-dbe072dcffd20c1d17d25b0cdde765cb9e7c74aa.tar.gz stable-diffusion-webui-gfx803-dbe072dcffd20c1d17d25b0cdde765cb9e7c74aa.tar.bz2 stable-diffusion-webui-gfx803-dbe072dcffd20c1d17d25b0cdde765cb9e7c74aa.zip |
Merge pull request #1126 from AUTOMATIC1111/notification-sound
adds support for a notification.mp3 in the root directory that will play upon completion (fixes #1013)
Diffstat (limited to 'javascript')
-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. |