mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-10 11:11:26 -08:00
Added dark mode switch
Launch the UI in dark mode with the --dark-mode switch
This commit is contained in:
parent
cccc5a20fc
commit
8c6a981d5d
3 changed files with 10 additions and 1 deletions
|
|
@ -1,5 +1,12 @@
|
|||
// various functions for interation with ui.py not large enough to warrant putting them in separate files
|
||||
|
||||
function go_dark_mode(){
|
||||
gradioURL = window.location.href
|
||||
if (!gradioURL.endsWith('?__theme=dark')) {
|
||||
window.location.replace(gradioURL + '?__theme=dark');
|
||||
}
|
||||
}
|
||||
|
||||
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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue