Skip to content

Repository files navigation

Hacker News Dark Mode Proxy

This project is a Cloudflare Worker that acts as a proxy for Hacker News, injecting a dark mode CSS theme while keeping the site fully functional.

🚀 Features

  • Proxies Hacker News through Cloudflare Workers.
  • Injects custom dark mode CSS.
  • Fast, free, and serverless.

📦 Installation & Setup

1. Clone the Repository

git clone https://github.com/vvainio/dark-hn.git
cd dark-hn

2. Install Wrangler

Wrangler is Cloudflare's CLI tool for managing Workers.

npm install -g wrangler

3. Configure Cloudflare

Update wrangler.toml with your Cloudflare Account ID. You can find it by running:

wrangler whoami

Then, replace your-cloudflare-account-id in wrangler.toml:

name = "dark-hn"
type = "javascript"
account_id = "your-cloudflare-account-id"
workers_dev = true
compatibility_date = "2025-02-24"

4. Deploy the Worker

To test locally:

wrangler dev

To deploy to Cloudflare:

wrangler publish

Once deployed, you'll get a URL like:

https://dark-hn.youraccount.workers.dev

Use this to browse Hacker News in dark mode.

🎨 Dark Mode CSS

The worker injects a set of CSS styles. These can be modified from ./src/index.ts.

📜 License

MIT License. Feel free to use and modify.


Enjoy browsing Hacker News in Dark Mode! 🌚

About

Simple CloudFlare Proxy for Browsing HackerNews in Dark Mode

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages