From 42ed50151dc8c5f8ed2d3fb78d5672a37e76a392 Mon Sep 17 00:00:00 2001 From: Mic Date: Thu, 12 Jun 2025 23:15:00 +0200 Subject: [PATCH] Refactor icon selection logic for regenerate and read aloud buttons. again --- js/mzta-chatgpt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/mzta-chatgpt.js b/js/mzta-chatgpt.js index dada55f4..b6210127 100644 --- a/js/mzta-chatgpt.js +++ b/js/mzta-chatgpt.js @@ -82,13 +82,13 @@ async function chatgpt_isIdle() { }}, 100);});} function chatgpt_getRegenerateButton() { - for (const mainSVG of document.querySelectorAll('main svg.icon-md')) { + for (const mainSVG of document.querySelectorAll('main svg.icon')) { if (mainSVG.querySelector('path[d^="M3.502 16.6663V13"]') || 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')) { + for (const mainSVG of document.querySelectorAll('main svg.icon')) { if (mainSVG.querySelector('path[d^="M9.75122 4.09203C9.75122"]') || mainSVG.querySelector('path[d^="M11 4.9099C11 4.47485"]')){ // read aloud icon found //console.log(">>>>>>>>>> found read aloud icon!"); return mainSVG.parentNode.parentNode;