Page 1 of 1

lesechos.fr

Posted: Sat Feb 10, 2018 2:31 pm
by UHU
Hello everybody, I need technical help in writing a filter that doesn't apply on all pages of one website. I read the documentation, tried different things, but didn't manage what I want. Here's my problem:

I want to block a script on pages with addresses that follow this pattern (not the real address here):

Code: Select all

http://www.site.com/red/012585.php
http://www.site.com/blue/098455.php
http://www.site.com/green/054663.php
etc
The name of the page starts with 0

But I want to allow that same script on pages with addresses that follow that pattern:

Code: Select all

http://www.site.com/red/index.php
http://www.site.com/blue/index.php
http://www.site.com/green/index.php
etc
The name of the page contains index

But I cannot reach that goal. Can someone help me ?
I'm not sure I'm posting in the right place, if I don't, tell me and I will act accordingly.
Thanks for reading this!

Re: lesechos.fr

Posted: Mon Feb 12, 2018 6:31 pm
by intense
Where is placed the script ? external script ? script hosted on the same folder / subdomain, domain ?

better providing a real case

Re: lesechos.fr

Posted: Tue Feb 13, 2018 4:43 pm
by UHU
Thank you for your reply.

It's a script hosted on the website, but on a different folder. It's a jquery script.

Code: Select all

In this instance, http://assets.site.com/script/jquery.js
There is a conflict with Easylist: when the focus is on the page at the end of its loading, most of its content disappear. I tried enabling the various things blocked by Easylist, but it didn't change a thing weirdly enough. But I found that disabling the jquery makes everything appear perfectly on the content pages. But on other pages, images with lazy loading don't all appear. So I look for a way to make an exception for some pages but not all.

Re: lesechos.fr

Posted: Tue Feb 13, 2018 5:34 pm
by intense
You could try something like this:

Code: Select all

||assets.site.com/script/jquery.js
@@|http://www.site.com/*/index.php|$document

Re: lesechos.fr

Posted: Tue Feb 13, 2018 10:51 pm
by UHU
Well it does enable the jquery script on the index.php pages, but it also enables everything else. I would like to enable just that script on those pages.

Re: lesechos.fr

Posted: Tue Feb 13, 2018 11:37 pm
by smed79
Give us a real testable example site and tell us what do you want to block / hide, what to keep etc...

Re: lesechos.fr

Posted: Wed Feb 14, 2018 3:02 pm
by UHU
I want Adblock active everywhere on the site, jquery blocked on content pages and and enabled on index.php pages. This is because I think it's a solution to the problem of the content disappearing when Easylist is active. I suspect that's a result of some sort of anti ad block process. I wanted to try to solve it myself by understanding how to write filters, instead of having to rely totally on others.
But here's the end goal: the text of articles disappear when on focus at the end of loading at

Code: Select all

https://www.lesechos.fr/industrie-services/conso-distribution/0301293263795-pepsico-compense-le-declin-des-sodas-avec-les-chips-2153350.php
And that's what I want to avoid.

Re: lesechos.fr

Posted: Wed Feb 14, 2018 3:25 pm
by intense
1. delete cookies + local storage for that site
2. use ublock origin (and disable your current adblocker)

or

add these filters and test the site

Code: Select all

@@||lesechos.fr^$generichide
@@||ads.videoadex.com/jw/advertisement.js
@@||assets.lesechos.com/lesechos/pics-news/js/pub/dfp.js$script,domain=lesechos.fr

Re: lesechos.fr

Posted: Wed Feb 14, 2018 4:23 pm
by UHU
intense wrote: Wed Feb 14, 2018 3:25 pm add these filters and test the site
I tried it, it didn't change a thing, the text still disappears at the end of its loading.

Re: lesechos.fr

Posted: Wed Feb 14, 2018 4:38 pm
by intense
- remove all other custom filters for that site, test again
- disable all other extensions, test again.

- try also uBo like I said above

Re: lesechos.fr

Posted: Wed Feb 14, 2018 4:57 pm
by UHU
I tried without any custom filter (except the two you gave me), the text still disappears.
I tried disabling all other extensions, the text still disappears.

I tried uBlock, the text doesn't disappear. I hope this will make it easier to find what's going on, because I don't really want to change from Adblock Plus.

Re: lesechos.fr

Posted: Wed Feb 14, 2018 5:17 pm
by intense
I added a new filter above.

However, if you are talking about the limit of 2 articles someone can read freely, well, just clear the cookies when you get such warning.
If you are talking about anti adb message the filters above are working for me in ABP.

uBo is using advanced techniques to fix the things (ABP can not deal with inline-javascript code at the moment)

Re: lesechos.fr

Posted: Wed Feb 14, 2018 5:40 pm
by UHU
That third filter did the trick, it works without having to block jquery. Thanks!

But it was not about the 2 articles limit or the anti adblock message, without that new filter (that I couldn't have found by myself, unfortunately), the main picture, the text and even the anti adblock message just disappeared upon completing loading, if the focus was on that page. It did that on Firefox, Chrome and Palemoon, as long as Easylist+Fr and Anti Adblock Plus were active, even with no other extension...

Being able to block inline-javascripts code seems nice.

Re: lesechos.fr

Posted: Wed Feb 14, 2018 5:56 pm
by smed79
UHU wrote:the text and even the anti adblock message just disappeared upon completing loading, if the focus was on that page.
I am unable to reproduce!!
UHU wrote:and Anti Adblock Plus ...
Do you mean Anti-Adblock Killer filter list? If yes, disable this list (deprecated/outdated) and test again.
Test also in a portable version of browser with ONLY Adblock Plus / EasyList + Liste FR.

Re: lesechos.fr

Posted: Wed Feb 14, 2018 6:22 pm
by UHU
No I meant Adblock Plus, sorry.
But my issue is fixed, thanks to the filters given to me by Intense. Even though I don't know what was the problem.