Is there a way to copy and paste values automatically into the ChatGPT’s chatbot?

I am trying to make an easier method to copy and paste prompts from a textbox using Javascript into a LLM Chatbot.

Right now, my script can only copy the value in a textbox in one tab and the Javascript opens ChatGPT or other LLM chatbot after a button is pressed. By pressing Ctrl + V will allow the user to paste to the chatbox.

Which is totally fine for now, but I was wondering if there’s a way in Firefox / Chrome / Safari that allows copy and paste automatically into a ChatGPT / other LLM chatbot automatically without using Ctrl + V.

Flow:

  1. Press button.
  2. Prompt automatically gets copied.
  3. Opens a new tab of ChatGPT / other LLM chatbot.
  4. Automatically pastes into the correct input text box.

I know same origin policy etc. might not allow, but if somebody knows how to implement this function, I would be grateful.

I don’t know if it is possible to open a new tab and paste text content there automatically without Ctrl + V after selecting the appropriate textbox.