News for hackers. Stuff that matters.
Re:Show HN: Tiny (222 Bytes) Dark Mode bookmarklet to enable... by gabrielsroka on Saturday June 06, 2020 @07:09PM (#23443157)
This 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') || '')
Re:Show HN: Tiny (222 Bytes) Dark Mode bookmarklet to enable... by x8d on Sunday June 07, 2020 @03:29AM (#23445485)
Hey 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.