Skip to content

Commit

Permalink
Merge pull request #33 from pedrokohler/fix-blinking-buttons
Browse files Browse the repository at this point in the history
Fix blinking buttons while bot is writing
  • Loading branch information
liady authored Mar 15, 2023
2 parents 342daf2 + 365f732 commit 920b174
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ function shouldRemoveButtons() {
}

function shouldAddButtons(actionsArea) {
// if it should remove the button, then it shouldn't add it back, otherwise there will be an annoying loop and blinking buttons
if(shouldRemoveButtons()){
return false;
}

// first, check if there's a "Try Again" button and no other buttons
const buttons = actionsArea.querySelectorAll("button");
const hasTryAgainButton = Array.from(buttons).some((button) => {
Expand Down

0 comments on commit 920b174

Please sign in to comment.