Prompt template
Run these steps in order.
01
Create a JavaScript bookmarklet that inserts a green 'Submit File' button before the element with class '.flex.flex-col.w-full.py-2.flex-grow.md\:py-3.md\:pl-4'. Style the button with white text color, 5px padding, no border, 5px border radius, and 5px margin. 02
Insert a progress container element before the same target element with width 99%, height 5px, and grey background color. Inside it, add a progress bar div with width 0%, height 100%, and blue background color. 03
Attach a click event to the 'Submit File' button that creates an invisible file input accepting .txt, .js, .py, .html, .css, .json, and .csv files, then triggers the file selection dialog. 04
After file selection, asynchronously read the file as text and split it into chunks of 15,000 characters each. 05
Iterate over each chunk, setting the ChatGPT textarea's value to 'Part part of filename:' plus the chunk text, then dispatch a 'keydown' event for Enter to submit each chunk. 06
Update the progress bar width after submitting each chunk to reflect the completion percentage. 07
Before submitting the next chunk, asynchronously wait until ChatGPT is ready by checking the visibility of the element '.text-2xl > span:not(.invisible)'. 08
Once all chunks have been submitted, change the progress bar's color to blue to indicate completion.