diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-06 17:30:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-06 17:30:29 +0000 |
commit | ab4ddbf333eef170804ef8de67001f77c8fdd64c (patch) | |
tree | 21cb1109f8eae463aa4066eec0926cd71ab81740 /javascript/progressbar.js | |
parent | 2a7f48cdb8dcf9acb02610cccae0d1ee5d260bc2 (diff) | |
parent | cf7c784fcc0c84a8a4edd8d3aca4dda4c7025c43 (diff) | |
download | stable-diffusion-webui-gfx803-ab4ddbf333eef170804ef8de67001f77c8fdd64c.tar.gz stable-diffusion-webui-gfx803-ab4ddbf333eef170804ef8de67001f77c8fdd64c.tar.bz2 stable-diffusion-webui-gfx803-ab4ddbf333eef170804ef8de67001f77c8fdd64c.zip |
Merge branch 'master' into gallery-styling
Diffstat (limited to 'javascript/progressbar.js')
-rw-r--r-- | javascript/progressbar.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/javascript/progressbar.js b/javascript/progressbar.js index 21f25b38..f9e9290e 100644 --- a/javascript/progressbar.js +++ b/javascript/progressbar.js @@ -4,6 +4,21 @@ global_progressbars = {} function check_progressbar(id_part, id_progressbar, id_progressbar_span, id_interrupt, id_preview, id_gallery){ var progressbar = gradioApp().getElementById(id_progressbar) var interrupt = gradioApp().getElementById(id_interrupt) + + if(opts.show_progress_in_title && progressbar && progressbar.offsetParent){ + if(progressbar.innerText){ + let newtitle = 'Stable Diffusion - ' + progressbar.innerText + if(document.title != newtitle){ + document.title = newtitle; + } + }else{ + let newtitle = 'Stable Diffusion' + if(document.title != newtitle){ + document.title = newtitle; + } + } + } + if(progressbar!= null && progressbar != global_progressbars[id_progressbar]){ global_progressbars[id_progressbar] = progressbar @@ -30,6 +45,7 @@ function check_progressbar(id_part, id_progressbar, id_progressbar_span, id_inte onUiUpdate(function(){ check_progressbar('txt2img', 'txt2img_progressbar', 'txt2img_progress_span', 'txt2img_interrupt', 'txt2img_preview', 'txt2img_gallery') check_progressbar('img2img', 'img2img_progressbar', 'img2img_progress_span', 'img2img_interrupt', 'img2img_preview', 'img2img_gallery') + check_progressbar('ti', 'ti_progressbar', 'ti_progress_span', 'ti_interrupt', 'ti_preview', 'ti_gallery') }) function requestMoreProgress(id_part, id_progressbar_span, id_interrupt){ |