aboutsummaryrefslogtreecommitdiffstats
path: root/script.js
diff options
context:
space:
mode:
authorcryzed <cryzed@googlemail.com>2022-09-11 14:35:12 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2022-09-11 17:56:34 +0000
commit5fbed65236d539b657eaf3b88138388cd8b66544 (patch)
treed8c016387430b756f2f3b6e1463ba098c48562a9 /script.js
parentd97c6f221ff9f97823c7ffce181a243dec895fa1 (diff)
downloadstable-diffusion-webui-gfx803-5fbed65236d539b657eaf3b88138388cd8b66544.tar.gz
stable-diffusion-webui-gfx803-5fbed65236d539b657eaf3b88138388cd8b66544.tar.bz2
stable-diffusion-webui-gfx803-5fbed65236d539b657eaf3b88138388cd8b66544.zip
Add support for saving styles with negative prompts
Diffstat (limited to 'script.js')
-rw-r--r--script.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/script.js b/script.js
index f41cf90c..ba2fa8a7 100644
--- a/script.js
+++ b/script.js
@@ -186,11 +186,7 @@ window.addEventListener('paste', e => {
});
});
-function ask_for_style_name(style_name, text){
- input = prompt('Style name:');
- if (input === null) {
- return [null, null]
- }
-
- return [input, text]
+function ask_for_style_name(_, prompt_text, negative_prompt_text) {
+ name_ = prompt('Style name:')
+ return name_ === null ? [null, null, null]: [name_, prompt_text, negative_prompt_text]
}