Website Themes with uBlock Origin
The blog post explores using uBlock Origin for creating website themes, emphasizing security and performance benefits over other extensions. It demonstrates CSS customization and offers a dark mode skin for Hacker News. Darek Kay, a software developer, shares tips for syncing styles across devices.
Read original articleThe blog post discusses creating custom website themes using the uBlock Origin ad blocker instead of browser extensions like Stylish or Tampermonkey for security and performance reasons. By utilizing the style action operator, users can adjust the CSS of any website to customize its appearance. An example is provided to change the header/footer background color on a blog. The post also showcases a dark mode skin for Hacker News by modifying various CSS properties. Additionally, a bonus tip suggests hosting styling rules on GitHub to synchronize styles across devices by using uBlock Origin's custom filter list feature. The author, Darek Kay, is a software developer, blogger, and hobby photographer, providing ways to connect via Mastodon, GitHub, or Email.
Related
Microfeatures I love in blogs and personal websites
The article explores microfeatures for blogs and websites inspired by programming concepts. It highlights sidenotes, navigation tools, progress indicators, and interactive elements to improve user experience subtly. Examples demonstrate practical implementations.
Notes on implementing dark mode
The article explores refining dark mode implementation on websites using Tailwind for styling. It emphasizes a tri-state setting (dark, light, system default), local storage usage, and technical considerations for a seamless experience.
edit: I took one for the team, using the values from https://ethanschoonover.com/solarized/
I took the liberty to suppress the table background that HN has ( I don't like that element of the original HN style )
news.ycombinator.com##body:style(color: #657b83 !important; background-color: #fdf6e3 !important;)
news.ycombinator.com##table:style(background-color: #fdf6e3 !important;)
news.ycombinator.com##input:style(background-color: #93a1a1 !important;)
news.ycombinator.com##table, tr, td, .pagetop, .score:style(color: #657b83 !important;)
news.ycombinator.com##td:style(background-color: #fdf6e3 !important;)
news.ycombinator.com##b:style(color: inherit !important;)
news.ycombinator.com##a, .c00:style(color: #002b36 !important;)
news.ycombinator.com##.c00 a:style(color: #002b36 !important;)
news.ycombinator.com##.comhead, .subtext:style(color: #586e75 !important;)
news.ycombinator.com##.comhead > a, .subtext > a:style(color: #cb4b16 !important;)
news.ycombinator.com##.comhead font:style(color: #657b83 !important;)
news.ycombinator.com##.c5a, .c88, .c9c:style(color: #839496 !important;)
news.ycombinator.com##input:style(color: #657b83 !important;)
news.ycombinator.com##textarea:style(background-color: #eee8d5 !important; border-left: 12px solid #657b83 !important;)
news.ycombinator.com##font[color="#000000"]:style(color: #859900 !important;)
It is true that this part of specification was never developed to the degree to be really practical, but luckily at least some implementers went ahead and added what was missing: ability to target specific styles with specific chunks. UserCSS grew from this very mechanism.
I'm sure Firefox can do it even today (with one pref flipped), I guess most "good" progressive browsers as well, but last time I checked Chrome-ium chopped it out around 2014, effectively violating few specs [41091633]. They later provided the mechanism for extensions to use (the ability to inject style into cascade on the "user" origin level) but to my knowledge no extension picked it up as of now. (Maybe uBlock, after all?)
[41091633] https://news.ycombinator.com/item?id=7457970
Mine is: https://github.com/nuchi/gmail-inbox-high-contrast-restorati...
It restores the appearance of Gmail from before the recent (~2 years ago) layout change.
[1] As is pg's personal website so I assume this is as intended :)
Update: I tried and it worked!
That cow in the webpage is a nice touch.
I fully expected a modal window asking for my email to share updates and was surprised to receive a Joke instead.
Related
Microfeatures I love in blogs and personal websites
The article explores microfeatures for blogs and websites inspired by programming concepts. It highlights sidenotes, navigation tools, progress indicators, and interactive elements to improve user experience subtly. Examples demonstrate practical implementations.
Notes on implementing dark mode
The article explores refining dark mode implementation on websites using Tailwind for styling. It emphasizes a tri-state setting (dark, light, system default), local storage usage, and technical considerations for a seamless experience.