lesechos.fr

French supplemental subscription

Moderator: Liste AR & FR Mods

Locked
UHU
New Member
New Member
Posts: 8
Joined: Sat Feb 10, 2018 12:14 pm

lesechos.fr

Post 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!
intense
Contributor
Contributor
Posts: 10494
Joined: Wed Mar 27, 2013 9:56 am

Post by intense »

Where is placed the script ? external script ? script hosted on the same folder / subdomain, domain ?

better providing a real case
UHU
New Member
New Member
Posts: 8
Joined: Sat Feb 10, 2018 12:14 pm

Post 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.
intense
Contributor
Contributor
Posts: 10494
Joined: Wed Mar 27, 2013 9:56 am

Post by intense »

You could try something like this:

Code: Select all

||assets.site.com/script/jquery.js
@@|http://www.site.com/*/index.php|$document
UHU
New Member
New Member
Posts: 8
Joined: Sat Feb 10, 2018 12:14 pm

Post 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.
User avatar
smed79
Liste AR/FR Author
Liste AR/FR Author
Posts: 15839
Joined: Sun Jan 17, 2010 4:00 am
Location: EasyList Forum

Post by smed79 »

Give us a real testable example site and tell us what do you want to block / hide, what to keep etc...
•► Read RULES / Use forum Search
••► Don't post clickable links
•••►Upload screenshots at imgbb.com
UHU
New Member
New Member
Posts: 8
Joined: Sat Feb 10, 2018 12:14 pm

Post 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.
Moved from EasyList Subscriptions to Liste FR on Wed Feb 14, 2018 3:14 pm by intense

intense
Contributor
Contributor
Posts: 10494
Joined: Wed Mar 27, 2013 9:56 am

Post 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
UHU
New Member
New Member
Posts: 8
Joined: Sat Feb 10, 2018 12:14 pm

Post 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.
intense
Contributor
Contributor
Posts: 10494
Joined: Wed Mar 27, 2013 9:56 am

Post 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
UHU
New Member
New Member
Posts: 8
Joined: Sat Feb 10, 2018 12:14 pm

Post 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.
intense
Contributor
Contributor
Posts: 10494
Joined: Wed Mar 27, 2013 9:56 am

Post 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)
UHU
New Member
New Member
Posts: 8
Joined: Sat Feb 10, 2018 12:14 pm

Post 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.
User avatar
smed79
Liste AR/FR Author
Liste AR/FR Author
Posts: 15839
Joined: Sun Jan 17, 2010 4:00 am
Location: EasyList Forum

Post 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.
•► Read RULES / Use forum Search
••► Don't post clickable links
•••►Upload screenshots at imgbb.com
UHU
New Member
New Member
Posts: 8
Joined: Sat Feb 10, 2018 12:14 pm

Post 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.
Locked