Skip to content

pritesh1991/dark-theme-extension

Repository files navigation

Universal Dark Theme Extension

A Chrome extension that automatically applies a dark theme to all web pages, even those without native dark mode support.

Features

  • Universal Dark Mode: Applies a smart dark theme to all websites using CSS inversion.
  • Smart Detection:
    • Automatically detects if a website is already in dark mode (native support) and disables itself to prevent conflicts.
    • Preserves images, videos, and other media from color inversion.
    • Intelligently handles nested dark/light elements (e.g., a light dropdown inside a dark header).
  • Toggle Control: Easily enable or disable the extension via the popup menu.
  • Performance Optimized: Uses efficient DOM observation to handle dynamic content without slowing down your browsing.

Installation

  1. Download the extension files.
  2. Open Chrome and navigate to chrome://extensions/.
  3. Enable Developer mode in the top right corner.
  4. Click Load unpacked.
  5. Select the directory containing the extension files.

Usage

  • The extension runs automatically on all pages.
  • Click the extension icon in the toolbar to toggle the dark theme on/off.
  • If a site looks incorrect, try toggling the extension off and on again, or refresh the page.

Development

  • manifest.json: Extension configuration.
  • content.js: Core logic for theme injection and smart detection.
  • dark-theme.css: CSS rules for dark mode transformation.
  • popup.html/js/css: User interface.

About

A Chrome extension that automatically applies a dark theme to all web pages, even those without native dark mode support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors