aboutsummaryrefslogtreecommitdiffstats
path: root/javascript/imageParams.js
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/imageParams.js')
-rw-r--r--javascript/imageParams.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/javascript/imageParams.js b/javascript/imageParams.js
index 67404a89..057e2d39 100644
--- a/javascript/imageParams.js
+++ b/javascript/imageParams.js
@@ -1,7 +1,6 @@
-window.onload = (function(){
+window.onload = (function() {
window.addEventListener('drop', e => {
const target = e.composedPath()[0];
- const idx = selected_gallery_index();
if (target.placeholder.indexOf("Prompt") == -1) return;
let prompt_target = get_tab_index('tabs') == 1 ? "img2img_prompt_image" : "txt2img_prompt_image";
@@ -11,7 +10,7 @@ window.onload = (function(){
const imgParent = gradioApp().getElementById(prompt_target);
const files = e.dataTransfer.files;
const fileInput = imgParent.querySelector('input[type="file"]');
- if ( fileInput ) {
+ if (fileInput) {
fileInput.files = files;
fileInput.dispatchEvent(new Event('change'));
}