mirror of
https://github.com/f/awesome-chatgpt-prompts.git
synced 2025-05-25 11:22:01 +00:00
11 lines
370 B
JavaScript
11 lines
370 B
JavaScript
(function() {
|
|
// Listen for messages from the extension
|
|
browser.runtime.onMessage.addListener((message) => {
|
|
console.log("Message recieved, prompt = " + message.prompt)
|
|
// Find the text area element on the page
|
|
const textArea = document.querySelector("textarea")
|
|
|
|
// Fill the text area with the prompt
|
|
textArea.value = message.prompt;
|
|
});
|
|
})(); |