From 5fbed65236d539b657eaf3b88138388cd8b66544 Mon Sep 17 00:00:00 2001 From: cryzed Date: Sun, 11 Sep 2022 16:35:12 +0200 Subject: Add support for saving styles with negative prompts --- script.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'script.js') 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] } -- cgit v1.2.3