4 ms·
Show HN: Tiny (222 Bytes) Dark Mode bookmarklet to enable darkmode anywhere
- datfrojo 6y agoWhat are you going to do if you ever need to make any sort of change to the project? Rename the project?
- quickthrower2 6y ago222 is also the hex color, so the name would make sense still.
- gabrielsroka 6y agoThis is really neat! It would be great as a Greasemonkey script or a browser extension. Nitpick, it's actually 221 bytes. And if you e.getAttribute('style') on something that doesn't have style, it returns `null`. So maybe (e.getAttribute('style') || '')
- x8d 6y agoHey thanks, I had this condition in the script at one point, but then I started minifying it and although this makes the style attribute look a bit ugly the functionality stays the same, so it had to go.
- beckyb 6y agoThis is awesome, thank you!
- kseistrup 6y agoThanks, that's really neat. Would it be possible to make it a switch so that clicking the bookmarklet toggles darkmode?
- kseistrup 6y agoOh, it has already been added as an issue: https://github.com/x08d/222/issues/2 https://github.com/x08d/222/issues/2