Skip to content

Commit

Permalink
Updated chatgpt.send() to work w/ new chatbar ↞ [auto-sync from `Ku…
Browse files Browse the repository at this point in the history
…doAI/chatgpt.js`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Sep 12, 2024
1 parent 89911a8 commit faa2635
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion starters/chrome/extension/lib/chatgpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,8 @@ const chatgpt = { // eslint-disable-line no-redeclare
return console.error(`Argument ${ i + 1 } must be a string!`);
const textArea = chatgpt.getChatBox();
if (!textArea) return console.error('Chatbar element not found!');
textArea.value = msg;
const msgP = document.createElement('p'); msgP.textContent = msg;
textArea.replaceChild(msgP, textArea.querySelector('p'));
textArea.dispatchEvent(new Event('input', { bubbles: true })); // enable send button
setTimeout(function delaySend() {
const sendBtn = chatgpt.getSendButton();
Expand Down
2 changes: 1 addition & 1 deletion starters/chrome/extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "ChatGPT Extension",
"description": "A Chrome template to start using chatgpt.js like a boss!",
"version": "2024.9.10",
"version": "2024.9.12",
"author": "chatgpt.js",
"icons": {
"16": "icons/icon16.png",
Expand Down

0 comments on commit faa2635

Please sign in to comment.