Enhance chatgpt_getRegenerateButton to detect thumb up icon in addition to regen icon. see #277 #168

This commit is contained in:
Mic 2025-04-30 00:19:00 +02:00
parent f043f2e93b
commit 80bd81cb5a

View file

@ -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;
}
}
}