| (function () { | |
| /** @param {HTMLDivElement} gradioImage */ | |
| function patchDragAndDrop(gradioImage) { | |
| gradioImage.addEventListener("dragover", (e) => { | |
| const dt = e.dataTransfer; | |
| const isDroppingImage = dt.types.includes("text/uri-list") || dt.types.includes("text/html"); | |
| if (!isDroppingImage) return; | |
| const closeButton = gradioImage.querySelector('button[aria-label="Remove Image"]'); | |
| if (closeButton) closeButton.click(); | |
| }); | |
| } | |
| function setup() { | |
| for (const id of ["extras_image", "pnginfo_image"]) patchDragAndDrop(document.getElementById(id)); | |
| } | |
| onOptionsAvailable(() => { if (opts.remove_image_on_hover) setup(); }); | |
| })(); | |
Xet Storage Details
- Size:
- 737 Bytes
- Xet hash:
- c80b82912ea3a6f62600339b2803e65f3899ea8bf2b1dd509a424365056adafb
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.