From c8ccc121146e6166583ee4ed6653cdfc0028da48 Mon Sep 17 00:00:00 2001 From: mwyywm Date: Fri, 29 Sep 2023 09:23:47 +0200 Subject: [PATCH] fix: submit button selector --- src/providers/poe.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/providers/poe.js b/src/providers/poe.js index a082ca4..68e2043 100644 --- a/src/providers/poe.js +++ b/src/providers/poe.js @@ -8,7 +8,6 @@ class Poe extends Provider { static url = 'https://poe.com/'; static handleInput(input) { - const fullName = this.fullName; this.getWebview().executeJavaScript(`{ var inputElement = document.querySelector('textarea'); if (inputElement) { @@ -23,9 +22,8 @@ class Poe extends Provider { static handleSubmit() { this.getWebview().executeJavaScript(`{ - var buttons = Array.from(document.querySelectorAll('button.Button_primary__pIDjn')); - if (buttons[0]) { - var button = buttons[buttons.length - 1]; + var button = document.querySelectorAll('button[class*="ChatMessageSendButton_sendButton"]')[0] + if (button) { button.click(); } }`);