Hi I’m trying to write a Firefox extension that will allow me to upload a text file to ChatGPT, break the text/code in the text file up into chunks of 15,000 characters (to overcome the character/token size limitations of ChatGPT-4), then wait for all of the code to be submitted before being prompted by me to begin debugging. Once the debugging process has begun, I wish ChatGPT to print the completed and debugged code to a text downloadable file, again breaking the code up into chunks of 15,000 characters or less to avoid character/token limitations, which I can then download as the completed code.
I based my extension on the file upload plug-in that is described here:
“Uploading Files to ChatGPT: A More Powerful Experience”
Apparently I can’t include web links on this forum. so you will have to search for the video on your own.
But so far my extension doesn’t seem to do anything. There is no ‘button’ to upload files. Nada.
Here is the code I have so far
manifest.json
{
“manifest_version”: 2,
“name”: “ChatGPT File Upload”,
“version”: “1.0”,
“description”: “Adds a file upload button to ChatGPT sessions”,
“icons”: {
“48”: “icons/icon.png”
},
“permissions”: [
“activeTab”
],
“content_scripts”: [
{
“matches”: [“Link to ChatGPT-4*”], // Replace with the real URL of ChatGPT-4
“js”: [“file_upload.js”]
}
]
}
File_upload.js
File Submission .code { display: inline-block; background-color: #f0f0f0; padding: 3px; border: 1px solid #ccc; font-family: monospace; } ```But when I visit ChatGPT-4, the extension spits out an error saying ‘can’t read or change data on this site’. Again there is no expected ‘upload’ button or any of the features described in the original video either. What am I doing wrong and how do I fix it please?