diff options
author | MalumaDev <piano.lu92@gmail.com> | 2022-10-15 14:20:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 14:20:17 +0000 |
commit | 7b7561f6e4be3b591d845f14743bac2069e6428e (patch) | |
tree | f7ef27ffad7017c0d3cbd9b7a899c4308339885d /javascript/ui.js | |
parent | 37d7ffb415cd8c69b3c0bb5f61844dde0b169f78 (diff) | |
parent | d3ffc962dd1d5c8d0ed763a9d05832c153ff15ea (diff) | |
download | stable-diffusion-webui-gfx803-7b7561f6e4be3b591d845f14743bac2069e6428e.tar.gz stable-diffusion-webui-gfx803-7b7561f6e4be3b591d845f14743bac2069e6428e.tar.bz2 stable-diffusion-webui-gfx803-7b7561f6e4be3b591d845f14743bac2069e6428e.zip |
Merge branch 'master' into test_resolve_conflicts
Diffstat (limited to 'javascript/ui.js')
-rw-r--r-- | javascript/ui.js | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/javascript/ui.js b/javascript/ui.js index 0f8fe68e..9e1bed4c 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -141,7 +141,7 @@ function submit_img2img(){ 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] + return [name_, prompt_text, negative_prompt_text] } @@ -187,12 +187,10 @@ onUiUpdate(function(){ if (!txt2img_textarea) { txt2img_textarea = gradioApp().querySelector("#txt2img_prompt > label > textarea"); txt2img_textarea?.addEventListener("input", () => update_token_counter("txt2img_token_button")); - txt2img_textarea?.addEventListener("keyup", (event) => submit_prompt(event, "txt2img_generate")); } if (!img2img_textarea) { img2img_textarea = gradioApp().querySelector("#img2img_prompt > label > textarea"); img2img_textarea?.addEventListener("input", () => update_token_counter("img2img_token_button")); - img2img_textarea?.addEventListener("keyup", (event) => submit_prompt(event, "img2img_generate")); } }) @@ -220,14 +218,6 @@ function update_token_counter(button_id) { token_timeout = setTimeout(() => gradioApp().getElementById(button_id)?.click(), wait_time); } -function submit_prompt(event, generate_button_id) { - if (event.altKey && event.keyCode === 13) { - event.preventDefault(); - gradioApp().getElementById(generate_button_id).click(); - return; - } -} - function restart_reload(){ document.body.innerHTML='<h1 style="font-family:monospace;margin-top:20%;color:lightgray;text-align:center;">Reloading...</h1>'; setTimeout(function(){location.reload()},2000) |