aboutsummaryrefslogtreecommitdiffstats
path: root/script.js
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-01-04 16:56:35 +0000
committerGitHub <noreply@github.com>2023-01-04 16:56:35 +0000
commiteeb1de4388773ba92b9920a4f64eb91add2e02ca (patch)
tree22f5d5e7417f24599a415fd64c9f1652495ce5a3 /script.js
parentd85c2cb2d59f64cbb510a9e5596596de2e4f4dcc (diff)
parentb7deea47eeb033052062621b0005d4321b53bff7 (diff)
downloadstable-diffusion-webui-gfx803-eeb1de4388773ba92b9920a4f64eb91add2e02ca.tar.gz
stable-diffusion-webui-gfx803-eeb1de4388773ba92b9920a4f64eb91add2e02ca.tar.bz2
stable-diffusion-webui-gfx803-eeb1de4388773ba92b9920a4f64eb91add2e02ca.zip
Merge branch 'master' into gradient-clipping
Diffstat (limited to 'script.js')
-rw-r--r--script.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/script.js b/script.js
index 8b3b67e3..0e117d06 100644
--- a/script.js
+++ b/script.js
@@ -1,9 +1,10 @@
-function gradioApp(){
- return document.getElementsByTagName('gradio-app')[0].shadowRoot;
+function gradioApp() {
+ const gradioShadowRoot = document.getElementsByTagName('gradio-app')[0].shadowRoot
+ return !!gradioShadowRoot ? gradioShadowRoot : document;
}
function get_uiCurrentTab() {
- return gradioApp().querySelector('.tabs button:not(.border-transparent)')
+ return gradioApp().querySelector('#tabs button:not(.border-transparent)')
}
function get_uiCurrentTabContent() {
@@ -82,4 +83,4 @@ function uiElementIsVisible(el) {
}
}
return isVisible;
-} \ No newline at end of file
+}