ai generated solutions to our ai generated problems

This commit is contained in:
2026-06-20 01:03:04 +01:00
parent 6337046212
commit 25f2c5a0f8
2 changed files with 0 additions and 22 deletions
-21
View File
@@ -2329,26 +2329,6 @@ function routeStructuredData(origin, seo, canonicalUrl) {
])
}
function routePreloadLinks(pathname) {
const hrefs = []
if (pathname === '/') {
hrefs.push('/api/tss/leaderboard/teams?limit=4')
hrefs.push('/api/tss/games/recent?limit=50')
} else if (pathname === '/teams') {
hrefs.push('/api/tss/leaderboard/teams?limit=100')
} else if (pathname === '/players') {
hrefs.push('/api/tss/leaderboard/players?limit=100')
} else if (pathname === '/battle-logs' || pathname === '/live') {
hrefs.push('/api/tss/games/recent?limit=50')
hrefs.push('/api/tss/leaderboard/teams?limit=100')
}
return hrefs
.map((href) => `<link rel="preload" as="fetch" href="${escapeHtml(href)}" type="application/json" fetchpriority="high" />`)
.join('\n ')
}
function htmlWithSeo(req, data) {
const origin = pagePublicOrigin(req)
let pathname = '/'
@@ -2369,7 +2349,6 @@ function htmlWithSeo(req, data) {
.replaceAll('__SEO_ROBOTS__', escapeHtml(seo.robots))
.replaceAll('__SEO_CANONICAL__', escapeHtml(canonicalUrl))
.replaceAll('__SEO_JSON_LD__', routeStructuredData(origin, seo, canonicalUrl).replace(/</g, '\\u003c'))
.replaceAll('__TSS_PRELOAD_LINKS__', routePreloadLinks(pathname))
.replaceAll('__TURNSTILE_SESSION__', isTurnstileSessionVerified(req) ? 'verified' : 'required')
}