diff options
author | Michoko <michoko@hotmail.com> | 2022-10-17 16:24:24 +0000 |
---|---|---|
committer | Michoko <michoko@hotmail.com> | 2022-10-17 16:24:24 +0000 |
commit | 665beebc0825a6fad410c8252f27f6f6f0bd900b (patch) | |
tree | 1c4d9ddcc19decef0dbf0403eb5de8efa3c71bd3 /javascript/ui.js | |
parent | 8c6a981d5d9ef30381ac2327460285111550acbc (diff) | |
download | stable-diffusion-webui-gfx803-665beebc0825a6fad410c8252f27f6f6f0bd900b.tar.gz stable-diffusion-webui-gfx803-665beebc0825a6fad410c8252f27f6f6f0bd900b.tar.bz2 stable-diffusion-webui-gfx803-665beebc0825a6fad410c8252f27f6f6f0bd900b.zip |
Use of a --theme argument for more flexibility
Added possibility to set the theme (light or dark)
Diffstat (limited to 'javascript/ui.js')
-rw-r--r-- | javascript/ui.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/javascript/ui.js b/javascript/ui.js index bfa72885..cfd0dcd3 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -1,9 +1,9 @@ // various functions for interation with ui.py not large enough to warrant putting them in separate files -function go_dark_mode(){ +function set_theme(theme){ gradioURL = window.location.href - if (!gradioURL.endsWith('?__theme=dark')) { - window.location.replace(gradioURL + '?__theme=dark'); + if (!gradioURL.includes('?__theme=')) { + window.location.replace(gradioURL + '?__theme=' + theme); } } |