Spaces:
Running
Running
Add wc2026.css link + fix WC tabs to include History tab via post-load script
Browse files- 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>
|