Google site: Tool (Site results / Exclude sites)

Easily add site: or -site: to modify your current Google query. v1.5.5 2025-06-08

< Feedback on Google site: Tool (Site results / Exclude sites)

Review: Good - script works

§
Posted: 2025-03-22
Edited: 2025-03-22

The script has stopped working since the last google redesign.

§
Posted: 2025-03-23

Hopefully fixed in v1.5.3, posted just now.

§
Posted: 2025-03-23

Works great, thanks for your lightning fast response solving the issue.

§
Posted: 2025-05-08

It has stopped working again.

§
Posted: 2025-05-08

Yes, it seems that the event I attach to the cite line is being ignored now, but I'm not sure why.

§
Posted: 2025-05-29

Do you think right now it is impossible to fix? Have you tried using an AI to guess what could happen to the code?

Thanks.

§
Posted: 2025-05-29

I discussed it with ChatGPT but none of its suggestions worked. https://chatgpt.com/share/6837d748-3410-800c-879f-66ea21767f65

Ultimately, I decided it was necessary to move the whole block containing the icon, site name and cite out of the link. This caused various things to turn upside down until I could figure out how to turn that off. What a nightmare. Can you test a patch? It goes just before this line:

cite.addEventListener("click", gst_showSiteForm, false);

Create a new line before that and paste:

              // BEGIN PATCH for unclickable cite in link 5/28/2025
                var parentA = cite.closest('A, a');
                if (parentA) var parDiv = parentA.querySelector('h3 + br + div');
                if (parDiv){
                  // Move cite above the link (visually, no change, hopefully)
                  parDiv.parentNode.before(parDiv);
                  // Fix the position switching styles
                  parDiv.style.transform = 'none';
                  parDiv.parentNode.style.transform = 'none';
                  parentA.querySelector('h3').style.transform = 'none';
                }
              // END PATCH
§
Posted: 2025-05-29

Thanks! I have tested the patch, the script works again but the results are not being displayed well, the title/link to the result appears on the right side, as if there was no line break, here are two screenshots for the same result (with and without the script enabled):

§
Posted: 2025-05-29

Hi Floyd, I just noticed that this morning, too. It seems that Google's layout rules try to get them on one line if they could fit. More to work on after hours.

§
Posted: 2025-06-02
Edited: 2025-06-02

Here are the results from my conversation with Google AI Studio, which is currently working as expected.

This output includes references to your conversation with ChatGPT and the discussion thread mentioned.

It's usable at the moment, and I've provided the conversation history for your reference.

Since English isn't my native language, I really appreciate you creating this helpful little tool that allows us to enjoy using Google! ^^

https://aistudio.google.com/app/prompts?state=%7B%22ids%22%3A%5B%221uV2VD2s9iJxBETwfJQf_jnahj10cLBtz%22%5D%2C%22action%22%3A%22open%22%2C%22userId%22%3A%22112144974410804356191%22%2C%22resourceKeys%22%3A%7B%7D%7D&usp=drive_link

§
Posted: 2025-06-08

It was discovered that this change affected the "Manager Hiding" feature
of Google Hit Hider by Domain (Search Filter Block Sites).

I discussed it with Google AI, and it has since been corrected.

https://aistudio.google.com/app/prompts?state=%7B%22ids%22%3A%5B%221NTPY7uQQnGAMAiQjzKT-CLIma951hqyx%22%5D%2C%22action%22%3A%22open%22%2C%22userId%22%3A%22112144974410804356191%22%2C%22resourceKeys%22%3A%7B%7D%7D&usp=drive_link

§
Posted: 2025-06-09

Hi Floyd, I added a style rule to widen the cite, which I think resolves the issue with the patch. Version 1.5.5 is now live.

§
Posted: 2025-06-09

You are the man, thanks a lot!

§
Posted: 2025-06-09

I have found a case where the line does not fit, search for: Realtek ALC897

Maybe the style rule needs some fine tuning to allow more characters per line...

§
Posted: 2025-06-09

There is something different about the styles for those results with the file format bubble (PDF, DOC, XLS, etc.). Simply widening the element with cite doesn't have any effect on those results.

§
Posted: 2025-06-09
Edited: 2025-06-09

You are right, if you google for: manual filetype:PDF

You get something like the attachment. If you find a workaround let us know, thanks again.

§
Posted: 2025-06-10

For your reference, I have implemented a fix for the title misalignment issue that occurs on search result items with file types.

Here is the fixed version: https://pastebin.com/UEib1F96

The key part of the modified code is as follows:

// BEGIN PATCH for unclickable cite in link v1.5.4 5/28/2025
var parentA = cite.closest('A, a');
if (parentA) var parDiv = parentA.querySelector('h3 + br + div');
if (parDiv){
  // Move cite above the link (visually, no change, hopefully)
  parDiv.parentNode.before(parDiv);

  // --- FIX START for misaligned title with file type results ---
  // For results with file types, the title (H3) can become misaligned.
  // This fix moves the title (H3) after its sibling BR tag to correct the layout.
  var titleH3 = parentA.querySelector('h3');
  if (titleH3) {
      var lineBreak = titleH3.nextElementSibling;
      // Ensure the line break exists and is a BR tag before attempting to move the title.
      if (lineBreak && lineBreak.tagName === 'BR') {
          lineBreak.after(titleH3);
      }
  }
  // --- FIX END ---

  // Fix the position switching styles
  parDiv.style.transform = 'none';
  parDiv.parentNode.style.transform = 'none';
  if (titleH3) titleH3.style.transform = 'none';
  // Fix width issue 1.5.5 6/8/2025
  parDiv.style.width = 'calc(100% - 24px)';
}
// END PATCH

Thank you for your development and long-term support.

Post reply

Sign in to post a reply.