diff options
author | aoirusann <yimodo.siki@gmail.com> | 2022-10-15 03:48:13 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-15 06:59:40 +0000 |
commit | db27b987a97fc8b7894a9dd34bd7641536f9c424 (patch) | |
tree | 7defb47084066e1a9a43c87b99ce34366c7c22df /javascript/ui.js | |
parent | 661a61985c7bee34a67390a05761e25830a6b918 (diff) | |
download | stable-diffusion-webui-gfx803-db27b987a97fc8b7894a9dd34bd7641536f9c424.tar.gz stable-diffusion-webui-gfx803-db27b987a97fc8b7894a9dd34bd7641536f9c424.tar.bz2 stable-diffusion-webui-gfx803-db27b987a97fc8b7894a9dd34bd7641536f9c424.zip |
Add hint for `ctrl/alt enter`
And duplicate implementations are removed
Diffstat (limited to 'javascript/ui.js')
-rw-r--r-- | javascript/ui.js | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/javascript/ui.js b/javascript/ui.js index 0f8fe68e..56f4216f 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -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) |