brave-experiments / ad-block

Ad block engine used in the Brave browser for ABP filter syntax based lists like EasyList.
https://www.brave.com
Mozilla Public License 2.0
239 stars 95 forks source link

Adding support for new regional list (Iran) #225

Closed nimasaj closed 4 years ago

nimasaj commented 4 years ago

Thanks for the good work. :thumbsup: I have a regional list, for Iran and other Parsi-speaking countries, under active development, and I would like to ask you to include it as part of supported lists (in regions.h) to provide a more convenient web browsing using Brave for Parsi-speaking users.

URL: https://www.mynext.pro/uBOPa.txt Mirror: https://raw.githubusercontent.com/nimasaj/uBOPa/master/uBOPa.txt Title: uBOPa Language: Parsi (aka Farsi or Persian) | short form: "Pa" or "Fa" Homepage1: https://github.com/nimasaj/uBOPa/ Homepage2: https://www.mynext.pro/uBOPa/

ryanbr commented 4 years ago

Hey, just a few questions,

There would be plenty of dubes if a user includes this List, if they're using Easylist. The generic blocks and filters could cause slowdowns and probable false positives.

Can you make the list more regional for Iranian sites only?

Also, are you aware of this existing list? https://github.com/farrokhi/adblock-iran

nimasaj commented 4 years ago

Thanks for your reply.

I know adblock-iran filter list. I have also committed in that list in the past. However, I would like to maintain and keep this list separately. Focus of uBOPa is covering more websites at the end and be more efficient; and there are more ad portals/agencies supported in uBOPa as well.

I made a light version in which all possible generic and universal filters that might be in conflict with general lists like Easylist are removed. The remaining are related to Iran and web-ad agencies that are used by Iranian websites, or most visited sites in Iran.

URL: https://www.mynext.pro/uBOPa-light.txt Mirror: https://raw.githubusercontent.com/nimasaj/uBOPa/master/uBOPa-light.txt Title: uBOPa-light

ryanbr commented 4 years ago

Just a review;

a) The overuse of the wildcards in domains (not needed)

||adbrau.com* => ||adbrau.com^$third-party (example)

b) $all isn't really used by the community

c) not sectioned off enough, list needs to be more organised.The adservers, popups and site-specific filters, third-party are all mixed together

d) still plenty of non-iranian filters/Easylist filters Many dubes with Easylist will just bloat the list, and will make it slower.

||brightonclick.com*/display.php* ||bannersnack.com*$script ||cpxserving.com* ||adn.ebay.com* ||bnserving.com*$script ||bannersnack.com/iframe/* ||adsmarket.com* ||adjuggler.net* ||4dsply.com* ||2mdn.net/*flashwrite*$script .. etc

Test filters with Easylist+your list https://arestwo.org/famlam/redundantRuleChecker.html Which would bring up a few redundant filters and warnings also. Given the defacto list is Easylist, you don't want to duplicate the same/similar ad blocks.

e) elements like ##a[href="/ham3da.ir"]>img

Use of [href* needs to be used way less (they will slow down the parsing, use really wildcards sparingly)

Also "]>img bits is not needed

Example how it should look like (from Easylist):
##a[href^="//40ceexln7929.com/"]
##a[href^="http://adserving.unibet.com/"]

f) /bnr/ /tabligh Slow filters Too short filters.

/OneSignalSDKWorker.js isn't an advert.

While the list is promising its probably too early to include it in my opinion. The filterlist would need to mature a bit

nimasaj commented 4 years ago

Thanks for the feedback. I will close this topic for now until I work more on it. Then, I will re-open it to ask again.