Greasy Fork is available in English.

Google Hit Hider by Domain (Search Filter / Block Sites)

Block unwanted sites from your Google, DuckDuckGo, Startpage.com, Bing and Yahoo search results. v2.3.1 2024-05-11

< 腳本Google Hit Hider by Domain (Search Filter / Block Sites)的回應

提問/評論

§
發表於:2014-07-06

Compatibility

I'm using googlemonkeyR script on google as well as yours and when i hide something there is a blank space where the result was that doesn't get filled even if i reload the page so i was wondering if you could make your script somehow accommodate the results on the table that script creates so there are no blanks.

§
發表於:2014-07-07

This script currently hides results you do not want to see rather than deleting them completely. I think deleting them probably would be necessary to avoid having GoogleMonkeyR create a cell for them. It might be possible to add that option, assuming I can get the timing right and delete the result before they are laid out.

Which version of GoogleMonkeyR are you using? I tried version 1.7.0 with the fix here: http://jurnsearch.wordpress.com/2014/03/12/googlemonkeyr-temporary-fix/ and it is having a lot of problems loading and displaying subsequent pages. Do you have a link to a version that is working well for testing?

§
發表於:2014-07-07
編輯:2014-07-07

Yeah Im using a version that works well. Thanks for your response.

http://pastebin.com/qkUn0L9x

§
發表於:2014-07-07

Okay, here's something to try:

Open the Google Hit Hider script for editing in your favorite text editor. Usually you can do this from the Add-ons page > User Scripts section > right-click > Edit.

Search in the file for blockhidden and the first match should be on line 337:

                } else { // Perma-ban
                  liels[i].setAttribute("blockhidden",dompart);
                  if (currentG.indexOf("google") < 0 && liels[i].className.indexOf("ghhdnone")<0){
                    liels[i].className += " ghhdnone";
                    if (liels[i].className.indexOf("links_main")>-1) liels[i].parentNode.className += " ghhdnone wtf";
                  }
                }

As you can see, that code marks Perma-ban results so the script can find them when you update your list.

To hide them from GoogleMonkeyR, however, we need to actually delete them. So...

Replace that code with the following:

                } else { // Perma-ban
                  liels[i].remove();
                }

Then when you reload your results page, assuming yours works like mine, GHHbD will remove those items before GMR lays them out in table cells, thereby avoiding the blank cell problem.

Any luck?

Let me know how this works out, and whether it does the job. I'm not sure whether I will integrate this into the script in the near future without a lot of testing.

§
發表於:2014-07-08
編輯:2014-07-08

I tested what you said but it broke the script, the whole script wasn't working at all but I tried just changing the line

liels[i].setAttribute("blockhidden",dompart); with liels[i].remove();

and it worked but it showed some inconsistencies sometimes it will remove it sometimes not so I added to your script run at document start and added to monkeyR run at document end and now it works every time.

Thanks a lot.

§
發表於:2014-07-08

mmm now it's not working anymore run at document start seems now to be breaking the script.

§
發表於:2014-07-09
§
發表於:2014-07-09

No it's worse. It's not deleting them and some titles doesn't even have the block button.

§
發表於:2014-07-09

Could you post the URL of a search where it's not working and indicate which domains are on your Perma-ban list that are not being deleted?

§
發表於:2014-07-09

https://www.google.com.mx/search?hl=es&source=hp&biw=&bih=&q=little%20chocolatiers&gws_rd=ssl

None of the ones on the perma ban list are being deleted but they get hid.

here is the list of the perma banned sites http://www.imagebam.com/image/9c8084337930615

and here is how it looks (results not being hid and no hide button on some results)

http://www.imagebam.com/image/a2186b337930609

§
發表於:2014-07-10

I see, after the initial load, whenever you load new results, GoogleMonkeyR lays out the table before I can delete the list elements. So I probably need to write code for shuffling the table cells to eliminate the blanks. Without breaking anything.

I can't promise any time frame on that, but I'll try digging into it this weekend.

By the way, how did you change the default 2 column display to 3 columns? I can't get the options dialog to come up.

§
發表於:2014-07-10

Click on the google options button (the gear on the upper right) and then the script added there, to the menu, an item to open it's config.

Thanks for taking your time to do it.

§
發表於:2014-07-18

were you able to do any progress on it?

§
發表於:2014-07-18

Not yet, sorry Roxz.

§
發表於:2014-07-25

Just so I don't bother you anymore: Are you planing to release it for everybody if you manage to complete the request?

§
發表於:2014-07-26

This took several hours more than I expected, but I think I've solved it. Please give it a test: https://www.jeffersonscher.com/gm/beta/Google_Hit_Hider_by_Domain_(Search_Filter_Block_Sites).user.js

(Not sure why I get two install dialogs; if you get two, just cancel the second one.)

§
發表於:2014-07-26
編輯:2014-07-26

Nice man. Thanks a lot it seems to work perfectly. If I notice anything with further use I'll let you know. BTW i just got 1 install dialog although I'm using greasemonkey 1.15 so maybe that's an issue with the new version.

§
發表於:2014-12-27

Finally rolled this into the regular release of v1.6.5. You might need to click the Install button here to get it (I don't know how to redirect automatic update checking of the beta folder here).

發表回覆

登入以回復