Hacker News new | past | comments | ask | show | jobs | submit login

I've posted this before, but you can achieve the same with uBlock Origin static filters alone without having to install any additional extensions. For example:

To block results from specific domains on Google or DDG:

    google.*##.g:has(a[href*="thetopsites.com"])
    duckduckgo.*##.results > div:has(a[href*="thetopsites.com"])
And it's even possible to target an element's text content with a `:has-text(/regex/)` selector:

    google.*##.g:has(*:has-text(/bye topic of noninterest/i))
    duckduckgo.*##.results > div:has(*:has-text(/bye topic of noninterest/i))
As a bonus, here's how to get rid of Medium's obnoxious cookie notification across all domains:

    *##body > div > div:has(*:has-text(/To make Medium work.*Privacy Policy.*Cookie Policy/i))



Having a button to remove the offending site right from the search results saves quite a bit of time, so while i usually prefer not to have extra extensions, i see a lot of utility here.


Same reason why I still use uMatrix in addition to uBlock even though custom rules in the latter are not any less powerful - user interface matters.


I still think Adblock Plus has superior UI than uBlock Origin, despite hasn't been using it for years.


uBlock is a great blocker, but an absolutely garbage UI. Luckily the on/off button + 'Element Blocker' context menu entry do most of what I want without having to yet again try to decipher its cryptic icons.


I like ublock origin's UI. Its one of the best extension UI's Ive used. Simple and clear. It's bare bones for power users and I guess that makes it inaccessible, calling it garbage seems like overkill.


It's not clear though. I still have no idea what these columns mean, despite have been actively learning about them multiple times (as in, I have to re-learn every time I need to use them). They don't even have tooltips.

A good UI should be self-explanatory, this is not even close.


Exactly! i often wish the umatrix UI was just merged into ublock origin as an optional tool.


Wasn’t it though? Just click the “I’m an advanced user” button in the uBlock Origin options. Then you get the per-domain block details in the uBlock Origin extension button just like uMatrix.


Per domain, but not per feature. Matrix let you specify whether to block images, cookies, script, etc for each domain from the UI.


How often does one want to individually allow specific 3rd-party cookies+images? uBlock already allows control over specific 3rd party scripts.


Often, which is why people like me still use uMatrix.


Does that include uMatrix on iOS or Android OS.


This was supposed to be a trick question. I do not think uMatrix is available for a mobile OS.


Edit: Apparently someone is already doing something similar to what I described below. Please see... https://news.ycombinator.com/item?id=31694164

I suppose a simple bash script triggered with a hotkey could essentially circumvent your need to install uBlacklist.

I'm imagining the steps as follows...

1. Select the text of the URL you want uBlock Origin to eliminate (such as, AWebSiteIDoNotLike.com) from the Google search results you see.

2. Press your hotkey (say, Ctrl+F5 or Alt+F9).

3. The script appends the necessary text to my-ublock-static-filters_date_goes_here.txt


Not denying that. However, unless I'd be blocking new domains on a weekly basis, I just don't think it's worth installing an additional extension for something that's so easily achieved without.


I've started blocking results using ublock last year after it has been mentioned here, and I've got to the point where I have a script I can use to generate the relevant filters for google/bing and a few other search engines.

When I spot any domain which has been squatted by SEO and useless comparison-alike websites I immediately block it. This has brought up the quality of results IMMENSELY.

I'm blocking domains on a _daily_ basis.


The interesting thing is that Google could do this easily if they wanted to, but for some reason they don't. After all, if you can do it as an end user and in a low enough amount of time that it is worth it for you then surely Google can do it, they get to amortize that time across many more users.


Google in general has an aversion to giving users control. Their product vision is an omniscient AI that gives you enough of what you want that you'll tolerate the ads. The removal of user control is aided in many cases by justifications around security and UX design simplicity ("users don't know what they want"). But really it's about keeping control on the AI side.


I concur.

I suppose eventually Google's search results in many countries/jurisdictions (such as the EU, USA, etc) will be regulated like a public utility.

As a result, I expect Google will be forced to allow users to ban search results from particular URLs with a single click.


They actually used to offer this feature years ago but removed it.


Yes. I remember that feature. I was displeased when I noticed that it had been removed.


Hey, could you post a gist? I'm currently using uBlacklist to block exactly that type of shitty site you mention.


Would you mind sharing your script? I'd be glad to use it.


…have you used Google lately? I’m blocking junk results daily.


Been using this method to build on my blocklist for a few years, it's quite long by now ;)


Any chance of sharing it?


That’s the ticket. “Many intelligent people go out of their way to silence this site” is EXACTLY the kind of signal I want to pump into my information retrieval system.

Should be possible to crowd source this and publish the result as a list that’s consumed by uBlock origin…


That would be awesome.

I've found one other immediate and huge improvement to my mood was to remove all graphical elements from the news sites that I visit.


Yes, please! But I guess we'd need some form of web of trust?


There's too much personal stuff on there for me to be comfortable sharing it as is, and I'm afraid I don't have time to distil the list this weekend either.

I'd be happy to create you some ready-made filters for any specific sites or other types of results that you'd like to get rid of though, just let me know!


No, no problem, if it is just for me, I figured that if this can be crowdsourced effectively it would really clean up the search results and that is worth it if enough people start using it.

It might even be enough to stick it on github or gitlab and start accepting pull requests against a starter list.


I mean I definitely would be: I block YouTube channels pretty aggressively now, and there's a lot of websites I'd like to get rid of.


Is it possible to block/hide "People Also Search For" boxes in Google search results? It's annoying because each time you go back to search results, this little box re-aligns the whole list of results so you can't quickly click on the next search result.


This should do:

    google.*###search > div > div > div:has(span:has-text(/People also ask/))


This works!


This is the worst. I always click it on accident. Glad I'm not the only one going crazy... if it can't load at first, then don't load it at all


Yesssss, thank you so much!! Goodbye quora, stackshare, slant, etc. Finally.


can you do an example for blocking pinterest?


Sure, unclear which type of search you meant so here's both.

Regular search:

    google.*##.g:has(a[href*="pinterest.com"])
Image search:

    google.*##.isv-r:has-text(pinterest.)
Edit: Simplified the image search variant a bit.


Amen. Pinterest is such a pathetic spambucket.


I really like this solution, but FYI it blocks suffixes, adding gram.com blocks instagram.com, facebookgram.com, etc.


Check out this guide on attribute selectors on MDN for some options to finetune: https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_s...


Is there a way to get rid of results with listicle titles like "8 Best Toasters to Buy in 2022"?


If you could come up with a suitable regex for the title structures you want to block then you can feed that to :has-text() instead of a raw string.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: