惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
博客园 - 【当耐特】
S
SegmentFault 最新的问题
阮一峰的网络日志
阮一峰的网络日志
大猫的无限游戏
大猫的无限游戏
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
Martin Fowler
Martin Fowler
云风的 BLOG
云风的 BLOG
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Fortinet All Blogs
Y
Y Combinator Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks
Engineering at Meta
Engineering at Meta
MyScale Blog
MyScale Blog
B
Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - gorgonian/hn-dark-bookmarklet: Hacker News dark ...
gorgonian · 2026-05-09 · via Hacker News: Show HN

A dark-mode bookmarklet for Hacker News

What it does

  • Dark theme tuned for OLED iPhone screens
  • Survives navigation: tap once on HN, then click stories, comments, and pagination — dark mode stays on without re-tapping

Install on iPhone (bookmarklet)

iOS Safari won't let you save a javascript: URL directly from the address bar, so use the bookmark-then-edit dance:

  1. Copy the contents of dist/hn-dark.bookmarklet.txt.
  2. In Safari, open any page → share icon → Add Bookmark. Save it.
  3. Tap the bookmarks icon → Edit → tap the new bookmark.
  4. Rename to HN Dark. Tap the URL field, clear it, paste the entire contents of hn-dark.bookmarklet.txt. Save.
  5. Move it to the Favorites folder so it appears in the start-page grid when you tap the address bar.

Use it: navigate to news.ycombinator.com, tap the address bar, tap the HN Dark favorite. Browse normally — dark mode persists across HN navigation.

Project layout

src/
  hn-dark.js       # bookmarklet entry; references __HN_DARK_CSS__
  hn-dark.css      # styles, with CSS variables for easy tuning
build.mjs          # esbuild driver
dist/
  hn-dark.bookmarklet.txt   # the javascript: URL (build output)
  hn-dark.min.js            # same payload without the prefix

Build

npm install
npm run build      # writes dist/hn-dark.bookmarklet.txt
npm run watch      # rebuild on src/ changes

The build pipeline:

  1. esbuild minifies src/hn-dark.css to a string.
  2. esbuild minifies src/hn-dark.js, replacing the __HN_DARK_CSS__ identifier with the minified CSS string via define, and wraps the whole thing in an IIFE.
  3. The output is prefixed with javascript: and saved to dist/hn-dark.bookmarklet.txt.

Why one tap from anywhere isn't possible (with a bookmarklet)

The bookmarklet only does anything on news.ycombinator.com — invoked elsewhere, it's a no-op. It can't redirect-then-style: a top-level navigation destroys the bookmarklet's JS context, and HN's frame-ancestors 'self' blocks iframing it from a non-HN parent.

A truly one-tap-from-anywhere solution requires a Safari extension (more work + Apple developer fee $), or a hosted reverse proxy (untrustworthy).

Why the iframe approach works

  • HN sends Content-Security-Policy: ... frame-ancestors 'self', which per spec overrides its X-Frame-Options: DENY. So HN can frame itself.
  • CSP style-src 'unsafe-inline' allows the injected <style> tag.
  • Same-origin parent + iframe gives full DOM access; cookies and fnid form tokens flow normally, so login/voting/commenting all work.