chatgptweb: better handling of scrolldown when the button is not present

This commit is contained in:
mic 2024-09-25 21:09:36 +02:00
parent c06df565b5
commit 8aa77dece6

View file

@ -89,7 +89,7 @@ function chatgpt_getRegenerateButton() {
function chatpgt_scrollToBottom () {
try {
//document.querySelector('button[class*="cursor"][class*="bottom"]').click();
document.querySelector('path[d^="M12 21C11.7348"]').parentNode.parentNode.click();
document.querySelector('path[d^="M12 21C11.7348"]')?.parentNode?.parentNode?.click();
}
catch (err) { console.error('[ThunderAI] ', err); }
}