From 41850688677d7b36d313c98112bc53c2c51398ee Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Tue, 20 Sep 2022 11:16:17 +1000 Subject: [PATCH] feat(light-js): disable subscribe button when subscribed --- light-js/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/light-js/index.html b/light-js/index.html index 7dc20da..05d3f83 100644 --- a/light-js/index.html +++ b/light-js/index.html @@ -106,12 +106,14 @@ subscribeButton.onclick = async () => { unsubscribe = await node.filter.subscribe(callback, [ContentTopic]) unsubscribeButton.disabled = false; + subscribeButton.disabled = true; } unsubscribeButton.onclick = async () => { await unsubscribe(); unsubscribe = undefined unsubscribeButton.disabled = true; + subscribeButton.disabled = false; } sendButton.onclick = async () => {