diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-22 06:49:51 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-22 06:49:59 +0000 |
commit | ee65e729319e4184fc0d49552657e98aa0e28f17 (patch) | |
tree | f50f8846a7345f3c5177945b1ef02226eff952f7 /javascript/imageParams.js | |
parent | 0cbcc4d82899f8f95493975e9e79f16748105448 (diff) | |
download | stable-diffusion-webui-gfx803-ee65e729319e4184fc0d49552657e98aa0e28f17.tar.gz stable-diffusion-webui-gfx803-ee65e729319e4184fc0d49552657e98aa0e28f17.tar.bz2 stable-diffusion-webui-gfx803-ee65e729319e4184fc0d49552657e98aa0e28f17.zip |
repair file paste for Firefox from #10615
remove animation when pasting files into prompt
rework two dragdrop js files into one
Diffstat (limited to 'javascript/imageParams.js')
-rw-r--r-- | javascript/imageParams.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/javascript/imageParams.js b/javascript/imageParams.js deleted file mode 100644 index 0cdd717a..00000000 --- a/javascript/imageParams.js +++ /dev/null @@ -1,18 +0,0 @@ -window.onload = (function() { - window.addEventListener('drop', e => { - const target = e.composedPath()[0]; - if (e.dataTransfer.files.length == 0 || target.placeholder.indexOf("Prompt") == -1) return; - - let prompt_target = get_tab_index('tabs') == 1 ? "img2img_prompt_image" : "txt2img_prompt_image"; - - e.stopPropagation(); - e.preventDefault(); - const imgParent = gradioApp().getElementById(prompt_target); - const files = e.dataTransfer.files; - const fileInput = imgParent.querySelector('input[type="file"]'); - if (fileInput) { - fileInput.files = files; - fileInput.dispatchEvent(new Event('change')); - } - }); -}); |