summaryrefslogtreecommitdiff
path: root/docs/tabsync.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tabsync.js')
-rw-r--r--docs/tabsync.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/tabsync.js b/docs/tabsync.js
index 86e54b1c..935e42a2 100644
--- a/docs/tabsync.js
+++ b/docs/tabsync.js
@@ -4,6 +4,8 @@ document.addEventListener("DOMContentLoaded", function () {
for (const tab of tabs) {
tab.addEventListener("click", () => {
+ if (tab.dataset.syncing === "true") return;
+
const currentLabel = document.querySelector(`label[for="${tab.id}"]`);
if (!currentLabel) return;
@@ -19,7 +21,9 @@ document.addEventListener("DOMContentLoaded", function () {
const inputId = label.getAttribute("for");
const input = document.getElementById(inputId);
if (input && input !== tab) {
+ input.dataset.syncing = "true";
input.click();
+ input.dataset.syncing = "false";
}
}
}