3 ms·
If you're using ublock origin, I have these filters which I copied from another HN comment once upon a time. news.ycombinator.com##html:style(filter:invert(100
by cuttysnark 3y ago
If you're using ublock origin, I have these filters which I copied from another HN comment once upon a time.
news.ycombinator.com##html:style(filter:invert(100%) hue-rotate(180deg))
news.ycombinator.com##body:style(background: white)
news.ycombinator.com##div.toptext:style(color: black)
news.ycombinator.com###hnmain td[bgcolor="#000000"]
edit: "rules" -> "filters"
- SV_BubbleTime 3y agoI’m an embedded dev, so websites and web tech are a black box to me… I’ve never asked, does the ## mean “overwrite” as uBlock DSL?
- umvi 3y ago> I’m an embedded dev, so websites and web tech are a black box to me You should start tinkering with embedded webservers then (civetweb, etc)! Even embedded devs should learn web tech because often browsers are the easiest way to interface with router/modem settings, IoT settings, etc. In this case "##" is uBlock filter syntax. Basically "news.ycombinator.com##html:style(filter:invert(100%) hue-rotate(180deg))" means "if the host matches news.ycombinator.com inject the following CSS" Here's the docs if you want to rtfm: https://github.com/gorhill/uBlock/wiki/Dashboard:-My-filters https://github.com/gorhill/uBlock/wiki/Dashboard:-My-filters In this case I believe we are dealing with "cosmetic filters": https://github.com/gorhill/uBlock/wiki/Procedural-cosmetic-filters https://github.com/gorhill/uBlock/wiki/Procedural-cosmetic-f...
- dunham 3y agoTIL that ublock lets you inject CSS. I've been using tampermonkey for that (most recently to fix the mspace tags on ncatlab.org).
- hn92726819 3y ago> means "if the host matches news.ycombinator.com inject the following CSS" Well I wouldn't word it like that. youtube.com##.ytp-cards-teaser Hides elements with the selector ".ytp-cards-teaser", so ## doesn't represent "inject the followong CSS". This is a helpful link: https://github.com/gorhill/uBlock/wiki/Introduction-to-basic-filtering-syntax https://github.com/gorhill/uBlock/wiki/Introduction-to-basic... ## represents a cosmetic filter. Though I can't seem to figure out what #$# is still but I know that's also possible to use
- jmholla 3y agoNote: These actually go under the filters tab of uBlock Origin, not the rules tab.
- onetom 3y agoi didn't know ublock can be used as a poor man's violent monkey :) i can't read dark mode as well as light mode, but thanks for the advice!
- BackBlast 3y agoThat rule set is pretty harsh. Can I recommend: news.ycombinator.com##body:style(background: black) news.ycombinator.com##td:style(color: #fafafa !important) news.ycombinator.com##table:style(background-color: #120F0D) news.ycombinator.com##div.toptext:style(color: #fafafa) news.ycombinator.com##span.c00:style(color: #fafafa !important) news.ycombinator.com##a:style(color: #ffa000 !important) news.ycombinator.com##span#karma:style(color: #faa000 !important) news.ycombinator.com##span.pagetop:style(color: #fafafa !important) news.ycombinator.com##textarea:style(color: #fafafa !important; background: inherit; ) news.ycombinator.com###hnmain:style(background: #120F0D !important)
- swifthesitation 3y agoOh wow, thank you for sharing; this is lovely!
- calebj0seph 3y agoHere's a dark mode stylesheet for Hacker News that I've been maintaining for a while as well: https://userstyles.world/style/1898/hacker-news-dynamic-dark https://userstyles.world/style/1898/hacker-news-dynamic-dark Just need the Stylus extension for your browser. I've gone through every different feature on HN to tweak the colors, including details like down voted comment colors and obscure things like the special colors at Christmas.