maciejtarmas / AlleBlock

Zestaw reguł do popularnych wtyczek blokujących reklamy, obsługujących składnię Adblock. Usuwa zbędne elementy serwisu Allegro, nie ograniczając jego funkcjonalności.
https://alleblock.pl
30 stars 7 forks source link

Redundant rules #16

Closed MajkiIT closed 6 years ago

MajkiIT commented 6 years ago
||asa.allegrostatic.com/display-pl/*$domain=allegro.pl' has been made redundant by ' ||asa.allegrostatic.com/*$domain=allegro.pl'
' ||criteo.com/*$domain=allegro.pl' has been made redundant by ' ||criteo.com/*$domain=olx.pl'
' ||criteo.net/*$domain=allegro.pl' has been made redundant by ' ||criteo.net/*$domain=olx.pl'
' ||gemius.pl/*$domain=allegro.pl' has been made redundant by ' ||gemius.pl/*$domain=olx.pl'
' ||googletagmanager.com/*$domain=allegro.pl' has been made redundant by ' ||googletagmanager.com/*$domain=olx.pl'
' ||googletagservices.com/*$domain=allegro.pl' has been made redundant by ' ||googletagservices.com/*$domain=olx.pl'
' ||optimizely.com/*$domain=allegro.pl' has been made redundant by ' ||optimizely.com/*$domain=olx.pl'
' ||doubleclick.net/*$domain=allegro.pl' has been made redundant by ' ||doubleclick.net/*$domain=olx.pl'
' ||facebook.net/*$domain=allegro.pl' has been made redundant by ' ||facebook.net/*$domain=olx.pl'
' ||facebook.com/*$domain=allegro.pl' has been made redundant by ' ||facebook.com/*$domain=olx.pl'
' ||youtube.com/*$domain=allegro.pl' has been made redundant by ' ||youtube.com/*$domain=ceneo.pl'
' ||google-analytics.com/*$domain=allegro.pl' has been made redundant by ' ||google-analytics.com/*$domain=olx.pl'
' ||asa.allegro.pl/*$domain=allegro.pl' has been made redundant by ' ||asa.allegro.pl/*$domain=allegro.pl'
' ||doubleclick.net/*$domain=allegro.pl' has been made redundant by ' ||doubleclick.net/*$domain=olx.pl'
' ||gemius.pl/*$domain=allegro.pl' has been made redundant by ' ||gemius.pl/*$domain=olx.pl'
' ||google-analytics.com/*$domain=allegro.pl' has been made redundant by ' ||google-analytics.com/*$domain=olx.pl'
' ||googletagmanager.com/*$domain=allegro.pl' has been made redundant by ' ||googletagmanager.com/*$domain=olx.pl'
' ||googletagservices.com/*$domain=allegro.pl' has been made redundant by ' ||googletagservices.com/*$domain=olx.pl'
' ||ngacm.com/*$domain=allegro.pl' has been made redundant by ' ||ngacm.com/*$domain=allegro.pl'
' ||ngastatic.com/*$domain=allegro.pl' has been made redundant by ' ||ngastatic.com/*$domain=allegro.pl'
' ||usabilla.com/*$domain=allegro.pl' has been made redundant by ' ||usabilla.com/*$domain=allegro.pl'
' ||assets.allegrostatic.pl/opbox-advertisement/*$domain=allegro.pl' has been made redundant by ' ||assets.allegrostatic.pl/opbox-advertisement/*$domain=allegro.pl'
' ||assets.allegrostatic.pl/opbox-advertisement-box/*$domain=allegro.pl' has been made redundant by ' ||assets.allegrostatic.pl/opbox-advertisement-box/*$domain=allegro.pl'
' ||doubleclick.net/*$domain=ceneo.pl' has been made redundant by ' ||doubleclick.net/*$domain=olx.pl'
' ||facebook.com/*$domain=ceneo.pl' has been made redundant by ' ||facebook.com/*$domain=olx.pl'
' ||facebook.net/*$domain=ceneo.pl' has been made redundant by ' ||facebook.net/*$domain=olx.pl'
' ||google-analytics.com/*$domain=ceneo.pl' has been made redundant by ' ||google-analytics.com/*$domain=olx.pl'
' ||google.com/pagead/*$domain=ceneo.pl' has been made redundant by ' ||google.com/*$domain=sprzedajemy.pl'
' ||googlesyndycation.com/*$domain=ceneo.pl' has been made redundant by ' ||googlesyndycation.com/*$domain=ebay.pl'
' ||googletagmanager.com/*$domain=ceneo.pl' has been made redundant by ' ||googletagmanager.com/*$domain=olx.pl'
' ||googletagservices.com/*$domain=ceneo.pl' has been made redundant by ' ||googletagservices.com/*$domain=olx.pl'
' ||doubleclick.net/*$domain=ebay.pl' has been made redundant by ' ||doubleclick.net/*$domain=olx.pl'
' ||google.com/adsense/*$domain=ebay.pl' has been made redundant by ' ||google.com/*$domain=sprzedajemy.pl'
' ||googletagservices.com/*$domain=ebay.pl' has been made redundant by ' ||googletagservices.com/*$domain=olx.pl'
' ||google.com/adsense/*$domain=olx.pl' has been made redundant by ' ||google.com/*$domain=sprzedajemy.pl'
' ||googlesyndication.com/pagead/js/*$domain=olx.pl' has been made redundant by ' ||googlesyndication.com/*$domain=sprzedajemy.pl'
' ||gemius.pl/*$domain=sprzedajemy.pl' has been made redundant by ' ||gemius.pl/*$domain=olx.pl'
' ||doubleclick.net/*$domain=sprzedajemy.pl' has been made redundant by ' ||doubleclick.net/*$domain=olx.pl'
' ||googleadservices.com/*$domain=sprzedajemy.pl' has been made redundant by ' ||googleadservices.com/*$domain=ceneo.pl'
' ||googletagmanager.com/*$domain=sprzedajemy.pl' has been made redundant by ' ||googletagmanager.com/*$domain=olx.pl'
' ||facebook.com/*$domain=sprzedajemy.pl' has been made redundant by ' ||facebook.com/*$domain=olx.pl'
' ||googlesyndication.com/*$domain=sprzedajemy.pl' has been made redundant by ' ||googlesyndication.com/*$domain=allegro.pl'
' ||adform.net/*$domain=sprzedajemy.pl' has been made redundant by ' ||adform.net/*$domain=olx.pl'
' ||google-analytics.com/*$domain=sprzedajemy.pl' has been made redundant by ' ||google-analytics.com/*$domain=olx.pl'
maciejtarmas commented 6 years ago

Część będzie się powtarzać, bo nie zrobiłem do końca przejścia ze starego Allegro na nowe. Dlatego też bug #5 wisi cały czas otwarty :)

Ale weźmy np. to:

||doubleclick.net/*$domain=allegro.pl' has been made redundant by '||doubleclick.net/*$domain=olx.pl'

Sięgnijmy do dokumentacji Adblock Plus, a konkretnie sekcji Specifying filter options. Piszą tu tak:

Domain restrictions: The option domain=example.com means that the filter should only be applied on pages from "example.com" domain.

Co oznacza, zgodnie z moim założeniem ograniczenia się do wybranych serwisów, że blokuję doubleclick.net tylko na allegro.pl i olx.pl.

Mógłbym to zrobić w ten sposób:

||doubleclick.net/*$domain=allegro.pl|olx.pl

ale wolę mieć to odseparowane, żeby lista była bardziej czytelna.

Wydaje mi się, że twój skrypt nie bierze pod uwagę opcji domain=example.com, czyli zastosowania filtra tylko i wyłącznie we wskazanej domenie, a wychwytuje tylko samo ||doubleclick.net/* bez opcji.

hawkeye116477 commented 6 years ago

W AdGuardzie też liczą duplikaty i oni jakoś mniej ich wyliczyli -> https://github.com/AdguardTeam/FiltersRegistry/blob/master/filters/ThirdParty/filter_245_AlleBlock/diff.txt.

maciejtarmas commented 6 years ago

Co by potwierdzało moją teorię a propos skryptu Majkiego, czyli że

||doubleclick.net/*$domain=allegro.pl

i

||doubleclick.net/*$domain=olx.pl

traktuje jako duplikat. A duplikatem te filtry nie są, bo dotyczą dwóch różnych domen.

MajkiIT commented 6 years ago

@maciejtarmas @hawkeye116477 mój skrypt bazuje na znajdowaniu tych samych wartości, które można zbić do 1 reguły. Zawsze się zastanawiałem czy bardziej optymalnie jest dodanie reguły ||doubleclick.net/*$domain=olx.pl|allegro.pl czy podział na 2 reguły.

maciejtarmas commented 6 years ago

OK, w takim razie zamykam, bo nie licząc paru powtórek przy Allegro, rozbicie na różne domeny jest zamierzone.