From 80bd81cb5af85c4ede4b1dc566383727863657f7 Mon Sep 17 00:00:00 2001 From: Mic Date: Wed, 30 Apr 2025 00:19:00 +0200 Subject: [PATCH] Enhance chatgpt_getRegenerateButton to detect thumb up icon in addition to regen icon. see #277 #168 --- js/mzta-chatgpt.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/mzta-chatgpt.js b/js/mzta-chatgpt.js index 9325e146..3ec86530 100644 --- a/js/mzta-chatgpt.js +++ b/js/mzta-chatgpt.js @@ -83,8 +83,16 @@ async function chatgpt_isIdle() { function chatgpt_getRegenerateButton() { for (const mainSVG of document.querySelectorAll('main svg.icon-md')) { - if (mainSVG.querySelector('path[d^="M3.06957"]')) // regen icon found + if (mainSVG.querySelector('path[d^="M3.06957"]')){ // regen icon found + //console.log(">>>>>>>>>> found regen icon!"); return mainSVG.parentNode.parentNode; + } + } + for (const mainSVG of document.querySelectorAll('main svg.icon-md-heavy')) { + if (mainSVG.querySelector('path[d^="M12.1318 2.50389C12.3321"]')){ // thumb up icon found + //console.log(">>>>>>>>>> found thumb up icon!"); + return mainSVG.parentNode.parentNode; + } } }