From 2af0816f6630546ae4253fb55a7e3fa81465582d Mon Sep 17 00:00:00 2001 From: mic Date: Fri, 17 May 2024 19:10:58 +0200 Subject: [PATCH] send button query improved. ported from 1.0.10 --- js/mzta-chatgpt.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/mzta-chatgpt.js b/js/mzta-chatgpt.js index 25e8a3f9..40524fe3 100644 --- a/js/mzta-chatgpt.js +++ b/js/mzta-chatgpt.js @@ -26,7 +26,8 @@ let current_message = null; async function chatgpt_sendMsg(msg, method ='') { // return -1 send button not found, -2 textarea not found const textArea = document.querySelector('form textarea'), - sendButton = document.querySelector('form button[class*="main-surface-secondary"]'); + sendButton = document.querySelector('path[d*="M15.192 8.906a1.143"]')?.parentNode.parentNode // post-GPT-4o; + || document.querySelector('[data-testid="send-button"]'); // pre-GPT-4o //check if the textarea has been found if(!textArea) { return -2;