Cannot hide elements

Everything about using Adblock Plus on Google Chrome
Post Reply
morpher
Posts: 14
Joined: Mon Aug 10, 2015 3:23 pm

Cannot hide elements

Post by morpher »

I read a big news site screwing my laptop because of huge number of ads. They are not blocked on request level and not hidden. I tried just to apply simple

Code: Select all

##iframe 
on that site to hide the ads which appear in the iframes but I see they use the following:

Code: Select all

<iframe class="" uknlpf="" xrx="zjx" style="display: inline-table !important;"></iframe>
to prevent hiding probably.

Is there any solution to that?

UPDATE:

I removed

Code: Select all

!important
from iframe's style from within DevTools and the iframe got hidden.

Is there any solution to that?
Last edited by morpher on Sat Mar 18, 2017 5:50 pm, edited 1 time in total.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Cannot hide elements

Post by mapx »

which is the site ?

(due to how chrome is handling the styles ABP cannot hide the !important elements. However the chromium guys are working to fix it)
morpher
Posts: 14
Joined: Mon Aug 10, 2015 3:23 pm

Re: Cannot hide elements

Post by morpher »

mapx wrote:which is the site ?

(due to how chrome is handling the styles ABP cannot hide the !important elements. However the chromium guys are working to fix it)
The israeli site:

Code: Select all

ynet.co.il
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Cannot hide elements

Post by mapx »

be more specific: choose a page, indicate which are the ads you want to hide / block ..
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Cannot hide elements

Post by mapx »

However, you could also use this userscript (to remove the !important stuff)

- install first tampermonkey
- then this userscript:
https://greasyfork.org/en/scripts/14720 ... -important
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Cannot hide elements

Post by mapx »

more: the israelian sites are using webrtc channels to push ads. It's something ABP will address in the next weeks (as a developer said ..)
morpher
Posts: 14
Joined: Mon Aug 10, 2015 3:23 pm

Re: Cannot hide elements

Post by morpher »

http://pix.toile-libre.org/upload/original/1489856250.png

Three ads on the main page. On the image attached they are red-framed.
The link to the page:

Code: Select all

http://www.ynet.co.il/home/0,7340,L-8,00.html
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Cannot hide elements

Post by mapx »

I get only the right side ad

1. first install the userscript above
2. then add this filter

Code: Select all

ynet.co.il##iframe[style="display: inline-table ;"]
morpher
Posts: 14
Joined: Mon Aug 10, 2015 3:23 pm

Re: Cannot hide elements

Post by morpher »

Yes, works.
Great. Thanks alot!

Hope, some day we'll not need additional extensions to block those ads.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Cannot hide elements

Post by mapx »

yep, pretty soon the changes in chrome will permit ABP to hide itself all those elements
wrenhal
Posts: 8
Joined: Mon Oct 25, 2010 1:07 am

Re: Cannot hide elements

Post by wrenhal »

mapx wrote:which is the site ?

(due to how chrome is handling the styles ABP cannot hide the !important elements. However the chromium guys are working to fix it)
Does this mean that the only ways to block these are with the tampermonkey, or switch to Chromium when they fix it? Because I'm having the same problem on

Code: Select all

https://www.watchcartoononline.io/the-simpsons-season-28-episode-18-a-fathers-watch
There are 3 ads on that page that are marked !important and used the tampermonkey script but now how do I actually block the ads?
There is 1 between the episode description and the "Recent Release" sidebar and 1 under each player window.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Cannot hide elements

Post by mapx »

when the code can be blocked is way better (in this case ads pushed using websocket channels) using blocking filters (only as a last resort you should use hiding filters)

try

Code: Select all

*$websocket,domain=watchcartoononline.io
(you dont have to switch to chromium, all the code in chromium is then used in chrome)
wrenhal
Posts: 8
Joined: Mon Oct 25, 2010 1:07 am

Post by wrenhal »

mapx wrote:when the code can be blocked is way better (in this case ads pushed using websocket channels) using blocking filters (only as a last resort you should use hiding filters)

try

Code: Select all

*$websocket,domain=watchcartoononline.io
(you dont have to switch to chromium, all the code in chromium is then used in chrome)
Well, thank you for the filter. It works fine without the tampermonkey script.
morpher
Posts: 14
Joined: Mon Aug 10, 2015 3:23 pm

Re: Cannot hide elements

Post by morpher »

mapx wrote:However, you could also use this userscript (to remove the !important stuff)

Code: Select all

- install first tampermonkey
- then this userscript:
https://greasyfork.org/en/scripts/14720-it-s-not-important
A theoretical question: Why does not Adblock implement functionality of that script by itself?
Post Reply