script.js split work - ui.js

This commit is contained in:
AUTOMATIC
2022-09-18 09:00:06 +03:00
parent ce799a63e9
commit 5e80c286ee
6 changed files with 16 additions and 96 deletions

View File

@@ -1,7 +1,9 @@
// code related to showing and updating progressbar shown as the image is being made
global_progressbar = null
onUiUpdate(function(){
progressbar = root.getElementById('progressbar')
progressbar = gradioApp().getElementById('progressbar')
if(progressbar!= null && progressbar != global_progressbar){
global_progressbar = progressbar
@@ -27,3 +29,10 @@ onUiUpdate(function(){
mutationObserver.observe( progressbar, { childList:true, subtree:true })
}
})
function requestProgress(){
btn = gradioApp().getElementById("check_progress");
if(btn==null) return;
btn.click();
}