(async () => { try { await new Promise(resolve => setTimeout(resolve, 100)); const check = (ok, message) => { if (!ok) throw new Error(message); }; check(document.querySelector('.periodical-site-title').textContent === 'Public Blog', 'Domain branding'); check(document.querySelector('.periodical-full-article h1').textContent === 'Public registered title & notes', 'Registered title'); check(document.querySelector('.periodical-body').textContent.includes('Article body'), 'Body rendering'); check(document.querySelector('a[rel=next]').getAttribute('href') === '/2026/09/18/keyword', 'Next article'); check(document.querySelector('a[rel=prev]').getAttribute('href') === '/2026/09/16', 'Previous article'); check(document.querySelector('.periodical-calendar').getBoundingClientRect().width > 100, 'Calendar visibility'); const monthControls = document.querySelector('.periodical-month-controls'); check(monthControls && monthControls.getBoundingClientRect().height <= 36, 'Single-line month controls'); check(monthControls.getBoundingClientRect().bottom <= document.querySelector('.periodical-calendar').getBoundingClientRect().top, 'Month controls above calendar'); check(document.documentElement.scrollWidth <= innerWidth + 2, 'Horizontal overflow'); check(!document.querySelector('.periodical-body script'), 'Inert content'); const feed = await fetch('/rss.xml', {cache: 'no-store'}); const xml = new DOMParser().parseFromString(await feed.text(), 'application/xml'); check(feed.ok && !xml.querySelector('parsererror') && xml.querySelectorAll('item').length === 3, 'RSS'); document.body.dataset.vimReady = 'true'; } catch (error) { const element = document.createElement('pre'); element.id = 'error'; element.textContent = error.stack; document.body.append(element); } })();