News for hackers. Stuff that matters.
Re:Show HN: A Firefox add-on to strip Google search results ... by nabakin on Sunday May 24, 2020 @08:38PM (#23296410)
This is a great idea! I don't know why I hadn't thought of it beforehand! I looked through your code and it looks like you replace the HTML of the page. Have you considered appending "-site:<blacklisted url> -site:<blacklisted url>...etc" to the end of the search query instead? This way, the user still gets a full page of relevant search results.

I'm not sure how flexible extensions are, but maybe you could intercept all request attempts to google search, append the blacklisted URLs to the search query, then hide them on the loaded page so that the user doesn't have to see the long list of appended, blacklisted URLs.

Re:Show HN: A Firefox add-on to strip Google search results ... by davehcker on Sunday May 24, 2020 @08:44PM (#23296449)
Thanks. No that has the potential issue of assuming that results from your blacklist are complete crap. That'd be equivalent of removing the search results based on the blacklist entirely (right?). Based on a comment here on HN as well, I think that's not necessarily a good idea. You don't know what you don't know, so may be a blacklisted website may return a valid result (unlikely but probable, so I'm letting that assumption be there).

And feel free to contribute on Github if you like :)

Re:Show HN: A Firefox add-on to strip Google search results ... by nabakin on Sunday May 24, 2020 @08:52PM (#23296526)
It removes all blacklisted URLs from the search results. Isn't that what your extension does?
Re:Show HN: A Firefox add-on to strip Google search results ... by kmundnic on Sunday May 24, 2020 @09:12PM (#23296664)
According to the site on Firefox Add-ons [1], it tells you which websites it is not showing, which I think would not be possible with your suggestion.

[1] https://addons.mozilla.org/en-US/firefox/addon/wiper/

Re:Show HN: A Firefox add-on to strip Google search results ... by nathcd on Sunday May 24, 2020 @09:57PM (#23296966)
Ah, so it's actually not entirely removing blacklisted results, it's just condensing those results. Personally, I think I'd be more interested in nabakin's idea of editing the query before it gets sent to Google.

Although - like zargon says in a top-level comment - this clearly should just be built into search engines themselves. The only semi-legitimate reason I can think of that they wouldn't be is that results for a given query would be even less reproducible than they already are from person-to-person. But since Google already "personalizes" results, I don't think that's really a factor for them. They could just have a little button at the bottom that says "3 results from sites you've blacklisted - wanna see them?" or whatever.

Re:Show HN: A Firefox add-on to strip Google search results ... by rtsil on Sunday May 24, 2020 @11:03PM (#23297359)
Since the results are customized anyway, they should also give us a way to assign more or less weight to a result and learn from that for future search queries.

Google News does this on every link (Hide stories from XXX, More stories like this, Fewer stories like this) so clearly the feature exists.

Re:Show HN: A Firefox add-on to strip Google search results ... by davehcker on Monday May 25, 2020 @03:18AM (#23298808)
I am thinking about more customization, especially this that allows the user to 1. suppress (like now) or 2. remove the results entirely. But in my defence, it was a weekend project for a noob like me.
Re:Show HN: A Firefox add-on to strip Google search results ... by nathcd on Sunday May 24, 2020 @11:24PM (#23297479)
Agreed, that'd be excellent. It's too bad that it doesn't really seem like Google's MO to give us those kinds of levers in Search.
Re:Show HN: A Firefox add-on to strip Google search results ... by vanderZwan on Monday May 25, 2020 @06:30AM (#23299756)
> "-site:<blacklisted url> -site:<blacklisted url>...etc"

I actually have a keyworded URL in my Firefox bookmarks for that, IIRC there is a limit (a very low one if you really want to get rid of all the spam options) for how many sites you can block this way

Re:Show HN: A Firefox add-on to strip Google search results ... by dorgo on Monday May 25, 2020 @11:09AM (#23301849)
only 32 words/parts are allowed in a query.

https://www.google.com/search?q=test+-site%3Aa1.com+-site%3A...

Re:Show HN: A Firefox add-on to strip Google search results ... by giza182 on Monday May 25, 2020 @10:42AM (#23301577)
Google search blocklist works exactly as you describe, it's for Chrome though. Disclosure, I wrote it

https://chrome.google.com/webstore/detail/google-search-bloc...

Re:Show HN: A Firefox add-on to strip Google search results ... by nabakin on Monday May 25, 2020 @12:06PM (#23302371)
Oh cool! Have you figured out a way to avoid going over the max query length?
Re:Show HN: A Firefox add-on to strip Google search results ... by monadic2 on Sunday May 24, 2020 @10:36PM (#23297170)
In my experience the site filters are usually limited by query length.