chore: 初始提交 - 移除所有硬编码凭据,统一从环境变量读取
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
(async function(){
|
||||
try {
|
||||
const wrap = document.querySelector('#topbar')
|
||||
if (!wrap) return
|
||||
const res = await fetch('/common/nav.html')
|
||||
const html = await res.text()
|
||||
wrap.innerHTML = html
|
||||
const path = location.pathname.toLowerCase()
|
||||
let key = ''
|
||||
if (path.includes('/tools/weibo/')) key = 'weibo'
|
||||
else if (path.includes('/tools/markets/')) key = 'markets'
|
||||
else if (path.includes('/tools/wall/')) key = 'wall'
|
||||
else if (path.includes('/tools/funds/')) key = 'funds'
|
||||
else if (path.includes('/tools/ccb_private_funds/')) key = 'ccb_private_funds'
|
||||
else if (path.includes('/tools/cloud/')) key = 'cloud'
|
||||
else if (path.includes('/tools/weekly/')) key = 'weekly'
|
||||
else if (path.includes('/tools/ai-lib/')) key = 'ai-lib'
|
||||
else if (path.includes('/tools/expense/')) key = 'expense'
|
||||
if (key) {
|
||||
wrap.querySelectorAll('a.tab').forEach(a => {
|
||||
if (a.dataset.key === key) a.classList.add('active')
|
||||
else a.classList.remove('active')
|
||||
})
|
||||
}
|
||||
} catch {}
|
||||
})()
|
||||
Reference in New Issue
Block a user