// MEDIABROWSER 사이트 공용 스크립트 // 1) 스크롤 등장(reveal) — IntersectionObserver, 모션 축소 설정이면 즉시 표시 // 2) releases.html — releases.json(배포 시 생성)을 읽어 릴리스 목록 렌더 (function initReveal() { const items = document.querySelectorAll(".reveal"); if (!items.length) return; if (window.matchMedia("(prefers-reduced-motion: reduce)").matches || !("IntersectionObserver" in window)) { return; // .js 게이트를 켜지 않으면 CSS 기본값(표시 상태) 그대로 } document.documentElement.classList.add("js"); const io = new IntersectionObserver((entries) => { for (const e of entries) { if (e.isIntersecting) { e.target.classList.add("in"); io.unobserve(e.target); } } }, { threshold: 0.15, rootMargin: "0px 0px -8% 0px" }); items.forEach((el) => io.observe(el)); })(); // ── 릴리스 렌더 ────────────────────────────────────────────── const PLATFORMS = [ { id: "windows", label: "Windows", icon: "windows-logo", sub: "설치자를 실행하면 됩니다", match: (n) => /setup.*\.exe$/i.test(n) || /win/i.test(n) }, { id: "macos", label: "macOS 프리뷰", icon: "apple-logo", sub: "tar.gz 를 풀어 실행하는 프리뷰 빌드", match: (n) => /osx|darwin|mac/i.test(n) }, { id: "linux", label: "Linux 프리뷰", icon: "linux-logo", sub: "tar.gz 를 풀어 실행하는 프리뷰 빌드", match: (n) => /linux/i.test(n) }, { id: "android", label: "Android", icon: "android-logo", sub: "컴패니언 앱 APK", match: (n) => /\.apk$/i.test(n) }, ]; function detectPreferredAsset(name) { const ua = navigator.userAgent; if (/Windows/i.test(ua)) return /setup-x64\.exe$/i.test(name); if (/Android/i.test(ua)) return /\.apk$/i.test(name); if (/Mac/i.test(ua)) return /osx-arm64/i.test(name); if (/Linux/i.test(ua)) return /linux-x64/i.test(name); return false; } function fmtSize(bytes) { if (!bytes) return ""; const mb = bytes / 1048576; return mb >= 1024 ? (mb / 1024).toFixed(1) + " GB" : mb.toFixed(1) + " MB"; } function fmtDate(iso) { if (!iso) return ""; const d = new Date(iso); return `${d.getFullYear()}년 ${d.getMonth() + 1}월 ${d.getDate()}일`; } function esc(s) { return String(s).replace(/[&<>"]/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """ }[c])); } function assetRow(a, recommended) { return `
${esc(r.notes)}
` : ""} ${groupsHtml(r.assets)}`; if (featured) return `${esc(r.notes)}
` : ""}${groupsHtml(r.assets)}빌드 파이프라인은 이미 돌아가고 있습니다. 곧 이 자리에서 설치자를 받을 수 있습니다. 먼저 사용 안내를 둘러보세요.
잠시 후 새로고침해 주세요. 급하다면 릴리스 저장소에서 직접 받을 수 있습니다.