2 ms·
This is neat. Can these rules compare the votes on a post or number of comments to intensify the color accordingly?
by smusamashah 2y ago
This is neat. Can these rules compare the votes on a post or number of comments to intensify the color accordingly?
- deleted 2y ago[deleted]
- perihelions 2y agoIf you mean new comments relative to previous visits, then I believe no; uBlock is stateless as far as I know. If you mean absolute numbers, then, uBlock filters don't have a Turing-complete programming language (by intentional design), so there's nothing idiomatic for that. If you're categorizing integers by range, you can technically do that in regular expression languages (this is really an anti-pattern), ycombinator.com##:xpath(//span[contains(@class,"score")]):has-text(/\b[5-9]\d points/):style(color: Orange !important; font-weight: bold) ycombinator.com##:xpath(//span[contains(@class,"score")]):has-text(/\d{3} points/):style(color: Red !important; font-weight: bold) That's 50-99 and 100+ score points. ycombinator.com##:xpath(//span[contains(@class,"subline")]/a):has-text(/\b[5-9]\d\s+comments/):style(color: Orange !important; font-weight: bold) ycombinator.com##:xpath(//span[contains(@class,"subline")]/a):has-text(/\d{3}\s+comments/):style(color: Red !important; font-weight: bold) Same for comment counts.