aboutsummaryrefslogtreecommitdiffstats
path: root/script.js
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-04-29 10:10:46 +0000
committerGitHub <noreply@github.com>2023-04-29 10:10:46 +0000
commit87535fcf292af8890520e7f346df0f41dd74353a (patch)
tree89c7f9ac26ae637f22f2db1efe69fb4aa51e9c70 /script.js
parent02e351880796422eac3bbaf7aa86332b588651ce (diff)
parent1ffb44b0b2c9cb5fb379274515772741a9c1dbaf (diff)
downloadstable-diffusion-webui-gfx803-87535fcf292af8890520e7f346df0f41dd74353a.tar.gz
stable-diffusion-webui-gfx803-87535fcf292af8890520e7f346df0f41dd74353a.tar.bz2
stable-diffusion-webui-gfx803-87535fcf292af8890520e7f346df0f41dd74353a.zip
Merge branch 'dev' into Branch_AddNewFilenameGen
Diffstat (limited to 'script.js')
-rw-r--r--script.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/script.js b/script.js
index 97e0bfcf..1b9a443f 100644
--- a/script.js
+++ b/script.js
@@ -1,7 +1,9 @@
function gradioApp() {
const elems = document.getElementsByTagName('gradio-app')
- const gradioShadowRoot = elems.length == 0 ? null : elems[0].shadowRoot
- return !!gradioShadowRoot ? gradioShadowRoot : document;
+ const elem = elems.length == 0 ? document : elems[0]
+
+ if (elem !== document) elem.getElementById = function(id){ return document.getElementById(id) }
+ return elem.shadowRoot ? elem.shadowRoot : elem
}
function get_uiCurrentTab() {