The Dark Mode Toggle Bookmarklet is a powerful tool that forces dark mode on any website, even those that don't support it natively.
With one click, this bookmarklet injects a CSS overlay that inverts backgrounds to dark tones and text to light, creating a comfortable reading experience.
Perfect for late-night browsing, reducing eye strain, or simply preferring dark interfaces. Works on any webpage regardless of the site's own theme support.
javascript:!function(){const t="codebuff-dark-mode-css",o=document.getElementById(t);if(o)return o.remove(),document.body.classList.remove("codebuff-dark-active"),void alert("Dark mode OFF — original styles restored.");const e=document.createElement("style");e.id=t,e.textContent="\n\t\t*, *::before, *::after {\n\t\t\tbackground-color: #1a1a2e !important;\n\t\t\tcolor: #e0e0e0 !important;\n\t\t\tborder-color: #333 !important;\n\t\t\tbox-shadow: none !important;\n\t\t\ttext-shadow: none !important;\n\t\t}\n\t\timg, video, svg, canvas, iframe {\n\t\t\topacity: 0.85;\n\t\t\tfilter: brightness(0.9);\n\t\t}\n\t\ta { color: #6db3f2 !important; }\n\t\ta:hover { color: #9dd3ff !important; }\n\t\tinput, textarea, select, button {\n\t\t\tbackground-color: #2a2a3e !important;\n\t\t\tcolor: #e0e0e0 !important;\n\t\t\tborder-color: #555 !important;\n\t\t}\n\t::-webkit-scrollbar { background: #1a1a2e; }\n\t::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }\n\t",document.head.appendChild(e),document.body.classList.add("codebuff-dark-active"),alert("Dark mode ON — click again to toggle off.")}();Drag me to bookmark bar: 👉🏻 Dark Mode Toggle
Features #
- ✨ One-click toggle — click again to turn off
- 🔒 Works locally in your browser
- 📱 Compatible with all modern browsers
- 🚀 Instant dark mode injection
- 🛡️ No data collection or tracking
Why Use Dark Mode Toggle? #
- Force dark mode on sites that don't offer it
- Reduce eye strain during extended browsing
- Get a consistent dark experience across all websites
- Works universally — no site-specific support needed
- Lightweight CSS injection with no performance impact
How to Use #
- Drag the button above to your bookmarks bar
- Navigate to any webpage
- Click the bookmarklet to activate dark mode
- Click again to toggle it off and restore original styles
- Previous: CSS Grid Overlay
- Next: Delete Cookies