4 ms·
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 yo
by nabakin 6y ago
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.
- davehcker 6y agoThanks. 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 :)
- nabakin 6y agoIt removes all blacklisted URLs from the search results. Isn't that what your extension does?
- kmundnic 6y agoAccording 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/ https://addons.mozilla.org/en-US/firefox/addon/wiper/
- nathcd 6y agoAh, 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.
- rtsil 6y agoSince 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.
- nathcd 6y agoAgreed, 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.
- davehcker 6y agoI 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.
- monadic2 6y agoIn my experience the site filters are usually limited by query length.
- vanderZwan 6y ago> "-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
- deleted 6y ago[deleted]
- dorgo 6y agoonly 32 words/parts are allowed in a query. https://www.google.com/search?q=test+-site%3Aa1.com+-site%3Aa2.com+-site%3Aa3.com+-site%3Aa4.com+-site%3Aa5.com+-site%3Aa6.com+-site%3Aa7.com+-site%3Aa8.com+-site%3Aa9.com+-site%3Aa10.com+-site%3Aa11.com+-site%3Aa12.com+-site%3Aa13.com+-site%3Aa14.com+-site%3Aa15.com+-site%3Aa16.com+-site%3Aa17.com+-site%3Aa18.com+-site%3Aa19.com+-site%3Aa20.com+-site%3Aa21.com+-site%3Aa22.com+-site%3Aa23.com+-site%3Aa24.com+-site%3Aa25.com+-site%3Aa26.com+-site%3Aa27.com+-site%3Aa28.com+-site%3Aa29.com+-site%3Aa30.com+-site%3Aa31.com+-site%3Aa32.com+-site%3Aa33.com https://www.google.com/search?q=test+-site%3Aa1.com+-site%3A...
- giza182 6y agoGoogle search blocklist works exactly as you describe, it's for Chrome though. Disclosure, I wrote it https://chrome.google.com/webstore/detail/google-search-blocklist/fldofmijlnlnghbdlnjblfnelihnelnm?hl=en https://chrome.google.com/webstore/detail/google-search-bloc...
- nabakin 6y agoOh cool! Have you figured out a way to avoid going over the max query length?