From a48c09765da06eed361f9edb3a6329e52a2a5ccb Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 22 Jul 2022 06:26:49 +0200 Subject: [PATCH] Disable the button after clicking on it --- extension/add_items_to_collection.js | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/add_items_to_collection.js b/extension/add_items_to_collection.js index f800620..a58d3ac 100644 --- a/extension/add_items_to_collection.js +++ b/extension/add_items_to_collection.js @@ -22,6 +22,7 @@ async function addAllSubscribedToCollection() { const buttonElement = document.querySelector("#tidebringer-btn-add-all-subscribed"); buttonElement.removeEventListener("click", addAllSubscribedToCollection) buttonElement.className += " tidebringer-running"; + buttonElement.setAttribute("disabled", "true") const itemElements = document.querySelectorAll(".itemChoice"); for (let i = 0; i < itemElements.length; i++) {