Elem. hiding needs the page to be reloaded to work correctly

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
djibouti
Posts: 16
Joined: Sat Jul 25, 2015 3:13 am

Elem. hiding needs the page to be reloaded to work correctly

Post by djibouti »

Hello, guys,

Recently thefreedictionary.com started generating random ids and classes for <div>s with ads, apparently to prevent adblocking, so hiding those <div>s by ids/classes doesn't work anymore.

I created two rules to cope with that:

Code: Select all

thefreedictionary.com##div.content-holder > div:nth-child(1)
thefreedictionary.com##div.content-holder > div:nth-last-child(1)
They work, but for some reason need the page to be reloaded to be applied correctly.

So when I load the page for the first time I get something like this:
http://i.imgur.com/3tymsuk.png
And after pressing F5 (and in all subsequent page hits) I get what I need:
http://i.imgur.com/j7JoMXs.png

What may be the problem?

FF: 41.0.2
ABP: 2.6.10.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Elem. hiding needs the page to be reloaded work correctly

Post by mapx »

1.if this happens only on the firefox restart (restarting some thefreedictionary page) ==> it's "normal")
2.what do you want to hide ?

if it's about the yavli ads crap on the right side, use these filters:

Code: Select all

##[class$="_image_holder"]
##[class$="_label_box"]
##[class*="mdeyheadline_"]
djibouti
Posts: 16
Joined: Sat Jul 25, 2015 3:13 am

Re: Elem. hiding needs the page to be reloaded to work correctly

Post by djibouti »

1.if this happens only on the firefox restart (restarting some thefreedictionary page) ==> it's "normal")
No, that happens regardless of whether FF has been just started or not. I may be wrong, but it seems that the problem occurs with larger articles (like http://www.thefreedictionary.com/get) and doesn't with smaller ones (like http://www.thefreedictionary.com/amaranthine) - as if ABP doesn't have enough time(?) to process larger pages correctly on the first try.
2.what do you want to hide ?
I want to hide the "Instant Grammar Checker" ads at the top and at the bottom of the page:
http://i.imgur.com/ZjrTu5j.png
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Elem. hiding needs the page to be reloaded to work correctly

Post by mapx »

use this filter

Code: Select all

||img.tfd.com/sb/grammarly/*
or

Code: Select all

thefreedictionary.com##A[href^="http://www.grammarly.com"]
djibouti
Posts: 16
Joined: Sat Jul 25, 2015 3:13 am

Re: Elem. hiding needs the page to be reloaded to work correctly

Post by djibouti »

Thank you, the rules you provided work, no reloading is needed, but after the page loads I see the placeholder for the upper ad for a moment, then it collapses, moving the whole article block up, which is honestly even more irritating than having to press F5.

Maybe you could give me some advice about configuring APB and/or FF? That seems to have to do with the machine performance - and I have a rather outdated one, with an Intel Core 2 Duo T6400 CPU.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Elem. hiding needs the page to be reloaded to work correctly

Post by mapx »

remove the filters above, try this 1 (and check if there are broken functionalities):

Code: Select all

||thefreedictionary.com/x/*
for your system you could:
1.click ABP icon, options, uncheck "Count filter hits" ==> the filters wont be saved every time to write the hits on every triggered filter
2.or use ...chrome which is faster than firefox
djibouti
Posts: 16
Joined: Sat Jul 25, 2015 3:13 am

Re: Elem. hiding needs the page to be reloaded to work correctly

Post by djibouti »

The rule ||thefreedictionary.com/x/* blocks the ads and doesn't seem to break any functionalities.
Unchecking "Count filter hits" solved the problem I described in my first post.
Thank you very much for the help.
Post Reply