Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dolegi/222
222. Dark mode. Everywhere. 222 bytes of js to make any website dark
https://github.com/dolegi/222
bookmark bookmarklet dark-mode dark-theme
Last synced: 3 months ago
JSON representation
222. Dark mode. Everywhere. 222 bytes of js to make any website dark
- Host: GitHub
- URL: https://github.com/dolegi/222
- Owner: dolegi
- License: gpl-3.0
- Created: 2020-06-06T15:41:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-07T07:35:17.000Z (over 4 years ago)
- Last Synced: 2023-03-02T00:01:18.349Z (almost 2 years ago)
- Topics: bookmark, bookmarklet, dark-mode, dark-theme
- Language: JavaScript
- Size: 3.44 MB
- Stars: 57
- Watchers: 0
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 222. Dark mode. Everywhere.
222 is a bookmarklet that enables darkmode on any website.
Simply drag and drop these 222 bytes to your bookmarks bar
```javascript
javascript:document.querySelectorAll('*').forEach(e=>e.setAttribute('style','background-color:#222;background-image:none;color:#'+(/^A|BU/.test(e.tagName)?'36c;text-decoration:underline;':'eee;')+e.getAttribute('style')))
```
And then click the bookmark on any page you want to enable darkmode on.## Examples
![](./examples/hn.png)
![](./examples/youtube.png)
![](./examples/google.png)## Alternative Installation
Simply create a bookmark and set the content of [./index.js](./index.js) as the url and click it on any page you want to enable dark mode.## Customization
Customizing is easy, simpy fork the project and change the styles you would like in [./index.js](./index.js).## Chrome Extension:
To install as a chrome extension:
1. Check-out or download this project
2. Open Chrome Browser, click tools->extensions
3. Enable developer mode, click toggle ( top-right )
4. Click "load unpacked" button and choose the 222 installation folder
you're good to go!
## Contributing
Please open pull requests and issues on github for anything you find :).