Download extensions/batchlinks-webui/javascript/notification.js from dikdimon/test: direct link, hf CLI and curl.
- Browser
- Download file 600 Bytes
-
https://huggingface.co/dikdimon/test/resolve/main/extensions/batchlinks-webui/javascript/notification.js
- Command line
-
hf download hf://dikdimon/test/extensions/batchlinks-webui/javascript/notification.js
-
curl -L -o notification.js https://huggingface.co/dikdimon/test/resolve/main/extensions/batchlinks-webui/javascript/notification.js
600 Bytes
| let prevTextAreaValue = ''; | |
| let isTextAreaVisible = true; | |
| onUiUpdate(function() { | |
| const textArea = gradioApp().querySelectorAll('#tab_batchlinks textarea')?.[2]; | |
| const textAreaValue = textArea ? textArea.value : ''; | |
| if (isTextAreaVisible && textAreaValue.startsWith('All done!') && prevTextAreaValue !== textAreaValue) { | |
| gradioApp().querySelector('#finish_audio audio')?.play(); | |
| } | |
| if (!textArea) { | |
| isTextAreaVisible = false; | |
| } else if (textArea.style.display !== 'none') { | |
| isTextAreaVisible = true; | |
| } | |
| prevTextAreaValue = textAreaValue; | |
| }); | |