Refresh audience/admin UX, ntfy/track, social paths, and replace ebook chapters with the expanded catalog; keep local SQLite and one-off probe scripts out of tree. Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
912 B
TypeScript
33 lines
912 B
TypeScript
import React from 'react'
|
||
import ReactDOM from 'react-dom/client'
|
||
import { BrowserRouter } from 'react-router-dom'
|
||
import App from './App'
|
||
import './styles.css'
|
||
|
||
/** VIP 运营台 / Nomadro 微信台 / .com 三色隔离:hackrobot=紫,nomadro=绿 */
|
||
;(() => {
|
||
const h = window.location.hostname.toLowerCase()
|
||
const root = document.documentElement
|
||
if (h === 'admin.hackrobot.cn' || h.endsWith('.hackrobot.cn')) {
|
||
root.classList.add('brand-vip')
|
||
root.classList.remove('brand-nomadro')
|
||
} else {
|
||
root.classList.add('brand-nomadro')
|
||
root.classList.remove('brand-vip')
|
||
}
|
||
})()
|
||
|
||
if ('serviceWorker' in navigator) {
|
||
window.addEventListener('load', () => {
|
||
navigator.serviceWorker.register('/sw.js').catch(() => {})
|
||
})
|
||
}
|
||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||
<React.StrictMode>
|
||
<BrowserRouter>
|
||
<App />
|
||
</BrowserRouter>
|
||
</React.StrictMode>,
|
||
)
|