Skip to content

Commit

Permalink
fix: poe submit button selector (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwyywm authored Oct 5, 2023
1 parent 8619203 commit ca9c8c5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/providers/poe.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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();
}
}`);
Expand Down

0 comments on commit ca9c8c5

Please sign in to comment.