Friday, November 11, 2016

Ad-Block Element Rules for Manually Blocking Google, Yahoo and Bing Content

Codes for manually blocking Google, Yahoo and Bing content with adblock filtering rules

uBlock Origin


The following codes below applies only to uBlock Origin (see the codes below for AdBlock and Adblock Plus) and blocks the image content on all different google languages sites:



google.*##.th
google.*##[id^="apthumb"]
google.*##[id^="vidthumb"]
google.*##[id^="imgthumb"]
google.*##[id="uid_0"]
google.*##[src^="data:image/jpeg"]
google.*##[class="rg_l"]
google.*##[class="rg_di rg_bx rg_fr"]
google.*##[class="rg_di rg_bx rg_el ivg-i"]
google.*##.rg_di.rg_bx.rg_el.ivg-i
google.*##.rg_fbl
google.*###rg_s
google.*##.y.yf
google.*##[class="_ekh"]
google.*##[class="_ygd"]
google.*##[class="_Cjf"]
google.*##[class="th _lub"]
google.*##[class="th _lyb _Yqd"]
google.*##[class="iuth"]
google.*##[class="sidebarcover"]
google.*##.top._vQb._mnc
google.*##.bia.uh_rl
google.*##._zyj
google.*##._Udi.vk_c
google.*##._PBj._uyj
google.*##._lyb.th
google.*##.rg_i.rg_ic
google.*###rg_hi
google.*##.rg_i
google.*##._ygd
google.*##._bgi
google.*##._tek
google.*##._lub.th
google.*##._X6c
google.*##._tLg
google.*##._WCg
google.*##._NJb
google.*###\5f xQd
google.*###uid_8
google.*##.abspos
google.*##.iuth
google.*###uid_0
google.*##G-IMG
google.*##.sidebarcover
AdBlock, Adblock Plus and uBlock Origin

Since the above codes with the asterisk * character does not work on AdBlock and Adblock Plus (and Adblock Plus for Firefox), the block code needs to be changed. Although the below codes can be used in uBlock Origin, this is not recommended.


Note: Since I removed “google.com” from the codes below (otherwise it would be “google.com##.th” and the same for the rest), this means that these blocking rules now applies to all the websites on the internet and hence includes every google language website in the world that different people may use. It is highly doubtful that any other website uses the exact same code as google so there shouldn’t be any problems. I have not encounter any problems on any site so far, but you could always pause the adblocker temporarily if some problem would occur on some website while still having an image blocker enabled. That would show if it is the custom filter list that is causing the problem, or if it is just the site that did not load properly or having some temporarily problem.



##.th
##[id^="apthumb"]
##[id^="vidthumb"]
##[id^="imgthumb"]
##[id="uid_0"]
##[src^="data:image/jpeg"]
##[class="rg_l"]
##[class="rg_di rg_bx rg_fr"]
##[class="rg_di rg_bx rg_el ivg-i"]
##.rg_di.rg_bx.rg_el.ivg-i
##.rg_fbl
###rg_s
##.y.yf
##[class="_ekh"]
##[class="_ygd"]
##[class="_Cjf"]
##[class="th _lub"]
##[class="th _lyb _Yqd"]
##[class="iuth"]
##[class="sidebarcover"]
##.top._vQb._mnc
##.bia.uh_rl
##._zyj
##._Udi.vk_c
##._PBj._uyj
##._lyb.th
##.rg_i.rg_ic
###rg_hi
##.rg_i
##._ygd
##._bgi
##._tek
##._lub.th
##._X6c
##._tLg
##._WCg
##._NJb
###\5f xQd
###uid_8
##.abspos
##.iuth
###uid_0
##G-IMG
##.sidebarcover
Note: If you have these codes enabled in your adblocker, this means that all unnecessary google images and thumbnails will not work at all, and you will need to completely disable or pause your adblocker in order to make any image content show itself again (icons in mail.google.com and similar things etc. will still work).

These codes should block every single image and every single video thumbnail appearing on google (as of 2016) in addition to block every single summary book-frontcover in google books but still allowing you to read the content. But if there are still image elements that does not get blocked in google, or if they make changes in the future that will require new blocking codes, please let me know and I will look into it.


I can also make rules for other search engines if needed (or any site for that matter), but in that case you will have to contact me about it, but as it is now, I would prefer people using google since I believe it is the better search engine anyway.


The only other search engines I have manually generated some total block codes for is bing and yahoo:



bing.com##IMG
bing.com##[id^="emb"]
yahoo.com##IMG
search.yahoo.com##IMG
search.yahoo.com##IMG[class="s-img"]
search.yahoo.com##IMG[class="s-img d-b"]
images.search.yahoo.com##UL[id="sres"]
images.search.yahoo.com##IMG

Note: These block codes are recommended to be used even if you use an image blocker installed since (1) it will make google, bing and yahoo more safe to use, (2) not all image blockers blocks search engine images and thumbnails, (3) future updates of the addons that currently block those images may change and start to show them. One can just never know what will happen.


No comments:

Post a Comment