Skip to content

Commit

Permalink
flashing button fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aspiriine authored Mar 30, 2023
1 parent b85dea4 commit b542abe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function init() {
}
if (shouldAddButtons(actionsArea)) {
let TryAgainButton = actionsArea.querySelector("button");
if (!TryAgainButton && TryAgainButton != null) {
if (!TryAgainButton) {
const parentNode = document.createElement("div");
parentNode.innerHTML = buttonOuterHTMLFallback;
TryAgainButton = parentNode.querySelector("button");
Expand Down Expand Up @@ -58,7 +58,7 @@ function shouldAddButtons(actionsArea) {
// check if the conversation is finished and there are no share buttons
const finishedConversation = document.querySelector("form button>svg");
const hasShareButtons = actionsArea.querySelectorAll("button[share-ext]");
if (finishedConversation && !hasShareButtons.length) {
if (finishedConversation && !hasShareButtons.length && hasTryAgainButton) {
return true;
}

Expand Down

0 comments on commit b542abe

Please sign in to comment.