Assignment 4 chrome extension (DARK MODE)


Screenshot 2026-05-25 at 5.03.19 PM.png

Screenshot 2026-05-25 at 5.04.40 PM.png

Screenshot 2026-05-25 at 5.05.07 PM.png


README FILE

🌙 Midnight – Dark Mode Chrome Extension

A polished Chrome extension that applies beautiful dark mode to any website.

Features

  • 3 dark mode engines: Smart CSS override, CSS Invert, and Dim mode
  • Per-site settings – different settings for different websites
  • Global mode – enable for all sites at once
  • Fine-grained controls – Brightness, Contrast, Sepia sliders
  • SPA support – works on React, Vue, and other single-page apps
  • Remembers your settings per domain

Installation (Developer Mode)

  1. Open Chrome and go to chrome://extensions/
  2. Enable Developer mode (top-right toggle)
  3. Click "Load unpacked"
  4. Select the darkmode-extension folder
  5. The 🌙 icon will appear in your toolbar — pin it!

How to Use

  1. Click the 🌙 Midnight icon in Chrome toolbar
  2. Toggle Dark Mode on
  3. Choose a mode:
    • Smart – rewrites colors intelligently (best for most sites)
    • Invert – inverts all colors (high contrast)
    • Dim – simply dims the screen
  4. Adjust Brightness, Contrast, and Sepia to taste
  5. Switch between "This site" and "All sites" scope

Files

darkmode-extension/
├── manifest.json      # Extension config (Manifest v3)
├── content.js         # Injected into every page
├── background.js      # Service worker
├── popup.html         # Extension popup UI
├── popup.js           # Popup logic
└── icons/
    ├── icon16.png
    ├── icon48.png
    └── icon128.png