From 115264b5896a9d7b244c8051151e703514f2897d Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 22 Jul 2022 06:25:28 +0200 Subject: [PATCH] Disable button after clicking on it once --- 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 1b08c25..f800620 100644 --- a/extension/add_items_to_collection.js +++ b/extension/add_items_to_collection.js @@ -20,6 +20,7 @@ async function addItemToCollection(itemElement) { async function addAllSubscribedToCollection() { const buttonElement = document.querySelector("#tidebringer-btn-add-all-subscribed"); + buttonElement.removeEventListener("click", addAllSubscribedToCollection) buttonElement.className += " tidebringer-running"; const itemElements = document.querySelectorAll(".itemChoice");