Hide div class with variable arguments

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
BlackRaven
Posts: 6
Joined: Sun Jan 08, 2017 6:46 pm

Hide div class with variable arguments

Post by BlackRaven »

Hi.
I want to block some blocks on the Yandex's mail service site like:

mail.yandex.ru##DIV.ns-view-folders.ns-view-id-??????????.mail-NestedList.??????????.mail-FolderList.js-folders.ns-view-container-desc

Expression is composed by the Adblock helper. Helper adds unique strings like:

mail.yandex.ru##DIV.ns-view-folders.ns-view-id-2965564617.mail-NestedList.30fnw83ugeb.mail-FolderList.js-folders.ns-view-container-desc

How to make an universal rule, so the rule could work for EVERY occasion? Because the Helpers' string block only one occassion.

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

Re: Hide div class with variable arguments

Post by mapx »

for example hiding
mail.yandex.ru##.promo-text.promo-text_main

can be done (guessing there are random parts in that class name) using:
mail.yandex.ru##DIV [class^="promo"][class$="main"]

(^ indicating the first part, $ indicating the last part)

see en/filters#elemhide_attributes
User avatar
smed79
Posts: 1224
Joined: Thu Jan 14, 2010 11:51 pm
Location: EasyList Forum
Contact:

Re: Hide div class with variable arguments

Post by smed79 »

test

Code: Select all

mail.yandex.ru##div[class*="ns-view-folders ns-view-id- mail-NestedList mail-FolderList js-folders ns-view-container-desc"]
BlackRaven
Posts: 6
Joined: Sun Jan 08, 2017 6:46 pm

Re: Hide div class with variable arguments

Post by BlackRaven »

mapx wrote:for example hiding
mail.yandex.ru##.promo-text.promo-text_main
can be done (guessing there are random parts in that class name) using:
mail.yandex.ru##DIV [class^="promo"][class$="main"]
(^ indicating the first part, $ indicating the last part)
see en/filters#elemhide_attributes
I've already seen this tutorial. I've tried mail.yandex.ru##DIV[title^="ns-view-folders"] [title$="ns-view-container-desc"] - no use.
smed79 wrote:test

Code: Select all

mail.yandex.ru##div[class*="ns-view-folders ns-view-id- mail-NestedList mail-FolderList js-folders ns-view-container-desc"]
No use either.

Also, intersting thing: after I load the page - no banners but if I change the tab and return they pop up again. Also - there is zero "hit" statistics in filter settings
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Hide div class with variable arguments

Post by mapx »

title ?

try

Code: Select all

mail.yandex.ru##DIV[class^="ns-view-folders"][class$="ns-view-container-desc"]
BlackRaven
Posts: 6
Joined: Sun Jan 08, 2017 6:46 pm

Re: Hide div class with variable arguments

Post by BlackRaven »

Right, "class" :)

But still it doesn't work. Hit counter doesn't react and banners re-appear if I switch between this tab with another.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Hide div class with variable arguments

Post by mapx »

I removed a space in the middle, could you try again (take again the filter above) ?
BlackRaven
Posts: 6
Joined: Sun Jan 08, 2017 6:46 pm

Re: Hide div class with variable arguments

Post by BlackRaven »

mapx wrote:I removed a space in the middle, could you try again (take again the filter above) ?
Gotcha! It works and the hit counter switched to "1". Looks like it was because of the spaces.
shameboo
Posts: 5
Joined: Fri Jan 13, 2017 4:21 am

in lieu of ubo, ehh

Post by shameboo »

BlackRaven
Posts: 6
Joined: Sun Jan 08, 2017 6:46 pm

Re: in lieu of ubo, ehh

Post by BlackRaven »

shameboo wrote:Wouldn't this be helpful?

https://addons.mozilla.org/en-US/firefo ... hidehelper
Helper hids only one occasion. The problem calss contains variables (e.g. numbers, characters) which changes every page refresh.
BlackRaven
Posts: 6
Joined: Sun Jan 08, 2017 6:46 pm

Re: Hide div class with variable arguments

Post by BlackRaven »

Back to start. They've changed something and the rule doesnt' work now.
Now the problem line is <div class="ns-view-xkzxmucy ns-view-id-139" data-key="view=xkzxmucy"> . Where bold characters change every page refresh.

Also page contains other ns-view classes, co I can't use simple mail.yandex.ru##DIV[class^="ns-view"]
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Hide div class with variable arguments

Post by mapx »

just report at ruadlist forum:
https://forums.lanik.us/viewforum.php?f=102

They can test your issue and provide useful filters / hints.
Post Reply