Skip to content

Commit

Permalink
Updated .scrollToBottom() to rely on .getScrollToBottomButton() +…
Browse files Browse the repository at this point in the history
… added error log
  • Loading branch information
adamlui committed May 9, 2024
1 parent d56d074 commit 62e3d95
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions chatgpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -1479,8 +1479,9 @@ const chatgpt = { // eslint-disable-line no-redeclare
reviewCode: function() { chatgpt.code.review(); },

scrollToBottom: function() {
try { document.querySelector('button[class*="cursor"][class*="bottom"]').click(); }
catch (err) { console.error('', err); }
const scrollBtn = chatgpt.getScrollToBottomButton();
if (scrollBtn) scrollBtn.click();
else console.error('Scroll button not found!');
},

send: function(msg, method='') {
Expand Down

0 comments on commit 62e3d95

Please sign in to comment.