DarkModer
A complete recreation of the Dark Reader browser extension as a userscript.
Features
- 4 Theme Engines: Filter, Filter+, Dynamic, and Static modes
- Full Color Control: Brightness, contrast, sepia, grayscale adjustments
- Custom Colors: Configure background and text colors
- Site List: Disable dark mode for specific sites
- Auto-Updating Configs: Configs hosted on GitHub, automatically loaded
- Automation: System preference or time-based activation
- Settings UI: Full settings panel (Alt+Shift+D)
- Import/Export: Backup and restore your settings
Installation
1. Install a Userscript Manager
- Tampermonkey (recommended): Chrome | Firefox | Edge
- Violentmonkey: Chrome | Firefox
- Greasemonkey (Firefox): Firefox
2. Install DarkModer
Or manually: Click on DarkReader-Full.user.js in this repo and your userscript manager should prompt you to install it.
3. Usage
- Toggle Settings: Press
Alt+Shift+Dor use the userscript manager menu - Enable/Disable: Use the main toggle in the settings panel
- Per-Site Toggle: Toggle dark mode for the current site
- Change Mode: Switch between Filter, Filter+, Dynamic, or Static
Config Files
DarkModer automatically loads config files from this repository:
| File | Purpose |
|---|---|
| `dark-sites.json` | Sites already dark (skip list) |
| `dynamic-theme-fixes.json` | Per-site CSS fixes for Dynamic mode |
| `inversion-fixes.json` | Per-site fixes for Filter modes |
| `static-themes.json` | Complete CSS themes for specific sites |
Contributing Fixes
Found a site that doesn't look right? You can:
- Fork this repo
- Edit the appropriate config file
- Submit a pull request
Or open an issue with the site URL and description of the problem.
Custom Config URL
Want to host your own configs?
- Fork this repo or host JSON files on any server
- Open settings (Alt+Shift+D) > More tab
- Enter your config base URL
- Configs will load from your URL instead
Theme Modes Explained
Filter Mode
- Uses CSS
filter: invert(1) hue-rotate(180deg) - Fast and simple
- May affect images (they get re-inverted)
- Works on most sites
Filter+ Mode
- Uses SVG filters for better color handling
- More vivid colors than Filter mode
- Slightly slower
- Better image handling
Dynamic Mode (Recommended)
- Analyzes page CSS and modifies colors
- Best visual results
- Preserves images naturally
- May be slower on complex pages
Static Mode
- Applies a simple dark CSS override
- Fastest mode
- May not work well on complex sites
- Good for simple pages
API
The userscript exposes a global API for advanced users:
// Access the API
const DR = window.DarkReaderUserscript;
// Enable/disable
DR.setEnabled(true);
DR.setEnabled(false);
// Change engine
DR.setEngine('dynamic'); // 'filter', 'filterPlus', 'dynamic', 'static'
// Change theme options
DR.setThemeOption('brightness', 110);
DR.setThemeOption('contrast', 95);
DR.setThemeOption('sepia', 10);
DR.setThemeOption('darkSchemeBackgroundColor', '#1a1a1a');
DR.setThemeOption('darkSchemeTextColor', '#e0e0e0');
// Toggle site
DR.toggleSite('example.com', true); // Disable for site
DR.toggleSite('example.com', false); // Enable for site
// Get current settings
const settings = DR.getSettings();
// Reset to defaults
DR.resetSettings();
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| Alt+Shift+D | Toggle settings panel |
| Escape | Close settings panel |
Theme Modes Explained
Filter Mode
- Uses CSS
filter: invert(1) hue-rotate(180deg) - Fast and simple
- May affect images (they get re-inverted)
- Works on most sites
Filter+ Mode
- Uses SVG filters for better color handling
- More vivid colors than Filter mode
- Slightly slower
- Better image handling
Dynamic Mode (Recommended)
- Analyzes page CSS and modifies colors
- Best visual results
- Preserves images naturally
- May be slower on complex pages
Static Mode
- Applies a simple dark CSS override
- Fastest mode
- May not work well on complex sites
- Good for simple pages
Troubleshooting
Script not working?
- Make sure your userscript manager is enabled
- Check if the site is in your disabled list
- Try switching to Filter mode
- Clear browser cache and reload
Images look weird?
- Dynamic mode preserves images best
- In Filter mode, images are double-inverted (may still look off)
Site looks broken?
- Try a different mode
- Add site to disabled list
- Open an issue to request a fix
Performance issues?
- Use Filter or Static mode for better performance
- Dynamic mode can be slow on heavy pages
License
MIT License - Same as original Dark Reader
Credits
Based on Dark Reader by Alexander Shutau and contributors.