diff options
author | Dynamic <bradje@naver.com> | 2022-10-23 13:36:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-23 13:36:56 +0000 |
commit | 660ae690bd7107b78aac6413e1370f8cd72676bc (patch) | |
tree | b666cfd0872687ccd293a41d9d0a90fcdfe1ea0a /javascript/ui.js | |
parent | 21364c5c39b269497944b56dd6664792d779333b (diff) | |
parent | 6bd6154a92eb05c80d66df661a38f8b70cc13729 (diff) | |
download | stable-diffusion-webui-gfx803-660ae690bd7107b78aac6413e1370f8cd72676bc.tar.gz stable-diffusion-webui-gfx803-660ae690bd7107b78aac6413e1370f8cd72676bc.tar.bz2 stable-diffusion-webui-gfx803-660ae690bd7107b78aac6413e1370f8cd72676bc.zip |
Merge branch 'AUTOMATIC1111:master' into kr-localization
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') |