/* Forge nav — "N NEW" news chip. * * Data source: files/news-meta.json (built by site/blog/build_blog.py). * Storage: localStorage["daslang:news:lastSeen"] = "YYYY-MM-DD". * * Semantics (mirrors blog-counter.js): * - First-time visitor (no key) → seeded from news-meta.json baseline_date, * which is the 2nd-newest entry's date. * So count = 1 (just the newest). * - Landing with hash "#news" → key set to newest_date; chip clears. * - Click on the news nav link → key set to newest_date. * - count > 9 → render "9+ NEW". * - count === 0 → chip not rendered. * * Nav anchors are matched by link.hash === "#news" so the same script works * from any page that links to "#news" / "index.html#news" / "../index.html#news". */ (function () { 'use strict'; var STORAGE_KEY = 'daslang:news:lastSeen'; function readLastSeen() { try { return window.localStorage.getItem(STORAGE_KEY); } catch (_) { return null; } } function writeLastSeen(date) { try { window.localStorage.setItem(STORAGE_KEY, date); } catch (_) { /* private mode / quota — silent */ } } function newsJsonUrl() { // Locate our own