From c3030431d26626eb2d6ac4a15a7d3fec38c6b528 Mon Sep 17 00:00:00 2001 From: parastoo Date: Wed, 11 Nov 2026 14:33:31 +0000 Subject: [PATCH] feat: auto-init topics matrix and query param tab switching --- dashboards/telegram-ads.html | 8 ++++++++ telegram-ads.html | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/dashboards/telegram-ads.html b/dashboards/telegram-ads.html index 2efcfd7..91529e0 100644 --- a/dashboards/telegram-ads.html +++ b/dashboards/telegram-ads.html @@ -1654,6 +1654,14 @@ ${t.post_draft} calculateSimulator(); updateLiveAdPreview(); renderChannelsTable(); + renderTopicsMatrix(); + + // Auto-switch tab based on ?tab= or #hash + const urlParams = new URLSearchParams(window.location.search); + const initialTab = urlParams.get('tab') || window.location.hash.replace('#', ''); + if (initialTab && document.getElementById('tab-' + initialTab)) { + switchTab(initialTab); + } }); diff --git a/telegram-ads.html b/telegram-ads.html index 2efcfd7..91529e0 100644 --- a/telegram-ads.html +++ b/telegram-ads.html @@ -1654,6 +1654,14 @@ ${t.post_draft} calculateSimulator(); updateLiveAdPreview(); renderChannelsTable(); + renderTopicsMatrix(); + + // Auto-switch tab based on ?tab= or #hash + const urlParams = new URLSearchParams(window.location.search); + const initialTab = urlParams.get('tab') || window.location.hash.replace('#', ''); + if (initialTab && document.getElementById('tab-' + initialTab)) { + switchTab(initialTab); + } });