diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-21 13:51:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 13:51:01 +0000 |
commit | ec37f8a45f316db8a20445aa80afd602457327b0 (patch) | |
tree | 20a59fe67602feeff3ba6e023f823a314294e78e /javascript/ui.js | |
parent | 003d2c7fe427edde299274c9e0d5fa59734e7f7e (diff) | |
parent | 85cb5918ee7c97cafafe4149880ed82f1933d919 (diff) | |
download | stable-diffusion-webui-gfx803-ec37f8a45f316db8a20445aa80afd602457327b0.tar.gz stable-diffusion-webui-gfx803-ec37f8a45f316db8a20445aa80afd602457327b0.tar.bz2 stable-diffusion-webui-gfx803-ec37f8a45f316db8a20445aa80afd602457327b0.zip |
Merge branch 'master' into features-to-readme
Diffstat (limited to 'javascript/ui.js')
-rw-r--r-- | javascript/ui.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/javascript/ui.js b/javascript/ui.js index 9e1bed4c..cfd0dcd3 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -1,5 +1,12 @@ // various functions for interation with ui.py not large enough to warrant putting them in separate files +function set_theme(theme){ + gradioURL = window.location.href + if (!gradioURL.includes('?__theme=')) { + window.location.replace(gradioURL + '?__theme=' + theme); + } +} + function selected_gallery_index(){ var buttons = gradioApp().querySelectorAll('[style="display: block;"].tabitem .gallery-item') var button = gradioApp().querySelector('[style="display: block;"].tabitem .gallery-item.\\!ring-2') |