2

Need a way to block annoying Google Doodle from ever showing again with uBlock origin.

I identify that images are coming from these HTML tags, I have no idea how to block g-img tag with uBlock.

<div class="IormK" aria-hidden="true" tabindex="-1" data-hveid="8" data-ved="0ahUKEwid58qgvLX_AhW5nFYBHX6bAf8QPQgI">
   <g-img class="Yyxs2 ZGomKf" style="height:96px;width:536px;background-color:rgba(255, 255, 255, 0)"><img src="/logos/doodles/2023/celebrating-willi-ninja-6753651837109840.7-shs.png" class="YQ4gaf" style="margin-left:-10px;margin-top:-10px" title="Willi Ninja's 62nd birthday" alt="Willi Ninja's 62nd birthday" data-atf="1" data-frt="0" width="1108" height="116"></g-img>
   <g-img class="JcyVnf ZGomKf" style="height:96px;width:542px;background-color:rgba(255, 255, 255, 0)"><img src="/logos/doodles/2023/celebrating-willi-ninja-6753651837109840.7-shs.png" class="YQ4gaf" style="margin-left:-556px;margin-top:-10px" title="Willi Ninja's 62nd birthday" alt="Willi Ninja's 62nd birthday" data-atf="1" data-frt="0" width="1108" height="116"></g-img>
</div>
<div class="logo Ib7Efc">
   <a href="https://www.google.com/webhp?hl=en&amp;ictx=2&amp;sa=X&amp;ved=0ahUKEwid58qgvLX_AhW5nFYBHX6bAf8QPQgJ" data-hveid="9">
   <img style="text-indent:100%;white-space:nowrap;overflow:hidden" alt="Willi Ninja's 62nd birthday" src="/logos/doodles/2023/celebrating-willi-ninja-6753651837109840.5-s.png" title="Willi Ninja's 62nd birthday" data-atf="1" data-frt="0" width="92" height="33" border="0">
   </a>
</div>

These custom filters don't work:

https://www.google.com/logos/doodles/*$image
https://www.google.com/logos/doodles/*#img
https://www.google.com/logos/doodles/*
Destroy666
  • 5,299
  • 7
  • 16
  • 35
Roman Toasov
  • 205
  • 2
  • 9
  • can I just say, the title of this question is the most pleasing to read out loud :p – Jaromanda X Jun 09 '23 at 05:53
  • in Australia, google doodles come from `https://www.google.com.au/logos/doodles/*` are you positive yours come from `www.google.com`? – Jaromanda X Jun 09 '23 at 06:07
  • @JaromandaX I am in India at moment and yes they come from `google.com/logos` (verified trough debugger "F12", Network tab), is there way to make uBlock origin filter like `*/logos/doodles/*` for any domain or this will slow down browser a lot? – Roman Toasov Jun 09 '23 at 07:24
  • no idea, haven't ever used ublock – Jaromanda X Jun 09 '23 at 07:43

1 Answers1

1

To block any Doodle images on any site with Google domain (https://google.com, http://images.google.pl), etc., you can add this to My filters section of uBlock:

||google.*/logos/doodles/*$image

The first part matches all domains, then we have path and lastly specification to block only images ($image).

That's assuming they're indeed on that URL. If you go to Doodles, some are actually on Google's CDN: lh3.googleusercontent.com there. You could try to block anything from that too, but it may also block non-Doodle images.

And lastly, to block all <g-img> HTML tags, this syntax can be used:

||google.*##^g-img
Destroy666
  • 5,299
  • 7
  • 16
  • 35
  • 2
    I was close though :) After some read i found this works better `||google.*/logos/doodles/*$image` as it block only domains starting with `google.` and without `||` rule matches also any domains ending with `google.` e.g. `abcgoogle.com` – Roman Toasov Jun 09 '23 at 09:27
  • Yea I had it in the answer initially and I removed it after trying something, I'll readd it. – Destroy666 Jun 09 '23 at 09:30