Fix tab selection - use data-tab attribute instead of missing IDs
Build and Push Docker Image / build (push) Successful in 40s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 30s
CI / Security audit (push) Successful in 49s
CI / Tests & coverage (push) Successful in 1m3s

This commit is contained in:
2026-05-21 00:55:18 +01:00
parent d12356e8f3
commit 46b42045f1
+4 -6
View File
@@ -4,10 +4,8 @@ import { getActiveTab, saveActiveTab } from '../utils/storage.js';
import { loadHistory } from './history.js';
export function initTabs() {
const downloadsTab = document.getElementById('downloads-tab');
const historyTab = document.getElementById('history-tab');
const downloadsSection = document.getElementById('downloads-section');
const historySection = document.getElementById('history-section');
const downloadsTab = document.querySelector('[data-tab="downloads"]');
const historyTab = document.querySelector('[data-tab="history"]');
if (!downloadsTab || !historyTab) return;
@@ -24,8 +22,8 @@ export function initTabs() {
}
export function activateTab(tab) {
const downloadsTab = document.getElementById('downloads-tab');
const historyTab = document.getElementById('history-tab');
const downloadsTab = document.querySelector('[data-tab="downloads"]');
const historyTab = document.querySelector('[data-tab="history"]');
const downloadsSection = document.getElementById('tab-downloads');
const historySection = document.getElementById('tab-history');