Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Baidu Support (v1.9.3+)

About: Google Hit Hider by Domain (Search Filter / Block Sites)
This seems to be mostly working.

There are three unusual features of Baidu:

(1) The domain is not coded into the title link. Instead, the script needs to read the green text below the excerpt. Sometimes this text is incomplete and ends with "...". Since there is no convenient way for the script to learn the full domain, the script records the ... and will use that in matching the green text. Sometimes, you end up needing to block two different domains: (2) Baidu removes the MutationObserver object, which is how scripts normally detect changes to the page, such as new results when you click page 2+. So the script needs to use an older technology that can slow down the site called a DOM mutation listener. There might be a better way to work around this, but this seems to work for now.

(3) When loading new results, Baidu removes the style rules and forms added by the script, so those need to be reinjected. This is why you currently cannot move the Manage Hiding button to the top or bottom on pages 2+ of your results. I will try to fix that later.

Please post feedback on how it works for you.
Sign In or Register to comment.