bep40 commited on
Commit
97942d5
·
verified ·
1 Parent(s): 7882b48

Add wc2026.css link + fix WC tabs to include History tab via post-load script

Browse files
Files changed (1) hide show
  1. static/wc_patch.html +16 -0
static/wc_patch.html ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <link rel="stylesheet" href="/static/wc2026.css">
2
+ <script>
3
+ // Fix: add History tab to WC2026 section after loadHome renders it
4
+ document.addEventListener('DOMContentLoaded',()=>{
5
+ const origLoadHome=window.loadHome;
6
+ if(!origLoadHome)return;
7
+ // Patch: after loadHome, inject History tab if missing
8
+ const _patchWCTabs=()=>{
9
+ const tabs=document.querySelector('.wc-tabs');
10
+ if(tabs&&!tabs.innerHTML.includes('history')){
11
+ tabs.innerHTML='<span class="wc-tab active" onclick="switchWCTab(\'news\')">📰 Tin tức</span><span class="wc-tab" onclick="switchWCTab(\'fixtures\')">📅 Lịch thi đấu</span><span class="wc-tab" onclick="switchWCTab(\'standings\')">🏆 BXH</span><span class="wc-tab" onclick="switchWCTab(\'stats\')">📊 Thống kê</span><span class="wc-tab" onclick="switchWCTab(\'history\')">📜 Lịch sử</span>';
12
+ }
13
+ };
14
+ setInterval(_patchWCTabs,2000);
15
+ });
16
+ </script>