diff options
Diffstat (limited to 'javascript')
-rw-r--r-- | javascript/hints.js | 1 | ||||
-rw-r--r-- | javascript/ui.js | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/javascript/hints.js b/javascript/hints.js index 57db35be..28e1651b 100644 --- a/javascript/hints.js +++ b/javascript/hints.js @@ -17,6 +17,7 @@ titles = { "\u2199\ufe0f": "Read generation parameters from prompt or last generation if prompt is empty into user interface.", "\u{1f4c2}": "Open images output directory", "\u{1f4be}": "Save style", + "\U0001F5D1": "Clear prompt", "\u{1f4cb}": "Apply selected styles to current prompt", "Inpaint a part of image": "Draw a mask over an image, and the script will regenerate the masked area with content according to prompt", diff --git a/javascript/ui.js b/javascript/ui.js index 2ca66d79..2cb280e5 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -131,6 +131,15 @@ function ask_for_style_name(_, prompt_text, negative_prompt_text) { return [name_, prompt_text, negative_prompt_text] } +function confirm_clear_prompt(prompt, negative_prompt) { + if(confirm("Delete prompt?")) { + prompt = "" + negative_prompt = "" + } + + return [prompt, negative_prompt] +} + opts = {} |