diff options
author | Connum <connum@gmail.com> | 2022-09-26 20:57:31 +0000 |
---|---|---|
committer | Connum <connum@gmail.com> | 2022-09-26 20:57:31 +0000 |
commit | 2846ca57028cca1a9ce9cee66d2500b4ac38a9c6 (patch) | |
tree | 5955b13f1edcc8ac57a6d59a99a4d9181438b1b7 /javascript | |
parent | 78d6aef30249530d8cc0b5023b2f8bf8c86f8446 (diff) | |
download | stable-diffusion-webui-gfx803-2846ca57028cca1a9ce9cee66d2500b4ac38a9c6.tar.gz stable-diffusion-webui-gfx803-2846ca57028cca1a9ce9cee66d2500b4ac38a9c6.tar.bz2 stable-diffusion-webui-gfx803-2846ca57028cca1a9ce9cee66d2500b4ac38a9c6.zip |
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. |