const params = new URLSearchParams(window.location.search); const model = params.get("model"); const problemSlug = params.get("problem"); async function loadProblemPage() { const res = await fetch(`/data/${model}.json`); const data = await res.json(); const problem = data.problems.find(p => p.slug === problemSlug); document.title = problem.title; document.getElementById("title").innerText = problem.title; document.getElementById("solution").innerText = problem.solution; }