Harden for public release: XSS fixes, error logging, style dedup
Security:
- escapeHtml: add single-quote escaping, type guard for non-string input
- Escape originalUrl in all href attributes (footer, header engage links,
repostedBy "other people" link, quotes link)
Developer experience:
- Add console.warn for missing/invalid URI attribute
- Add console.warn in fetchJson for API errors and network failures
(was completely silent before)
Quality:
- Deduplicate <style> injection — styles now go into document.head once
via an id-guarded style element instead of being inlined per-instance
- Fix misplaced JSDoc: "Format repostedBy" was above shuffle()
- Add .DS_Store to .gitignore
- Add author field to package.json
hide-reply.mjs:
- Differentiate "record not found" from network/auth errors in catch
blocks to avoid silently overwriting existing threadgate/postgate data
README:
- Fix "detach your post from a quoted post" (was backwards)
- Clarify graceful degradation: thread fetch failure = empty render