From 365f732e55f6441df9ab57bd6f565e16903ccd23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20H=2E=20K=C3=B6hler?= Date: Thu, 26 Jan 2023 15:16:25 -0300 Subject: [PATCH] Fix blinking buttons while bot is writing --- src/content_script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/content_script.js b/src/content_script.js index 2c6104e..53e6898 100644 --- a/src/content_script.js +++ b/src/content_script.js @@ -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) => {