Paste an image from your clipboard directly into the first available file upload input on the page.
How it works
1 Clipboard Detection: It checks event.clipboardData for any item with a MIME type starting with image/.
2 The DataTransfer Object: You can't just set input.value = "path/to/file" for security reasons. Instead, we use the DataTransfer API to simulate a file being dropped onto the input.
3 Smart Targeting: The script looks for all elements. It tries to find one that is visible (width and height > 0) so it doesn't accidentally dump the image into a hidden background field.
4 Event Dispatching: After attaching the file, it manually triggers the change event. This is crucial because many sites (like Discord or GitHub) wait for that event to start the upload process.