Making element hiding rule more specific?

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
vasa1
Posts: 76
Joined: Wed Apr 14, 2010 8:59 am

Making element hiding rule more specific?

Post by vasa1 »

There is this site: http://www.smartinvestor.in/index2.php

In it, I want to block a specific section called "Message Board".

If I select the entire section, "pc_1_423 pc_box" is picked for hiding. Unfortunately, it occurs more than once in this page and so more than what I want to block gets blocked with both the rules below:
Rule 1 (ticking both Tag name:DIV and class: www.smartinvestor.in##DIV.pc_1_423.pc_box
Rule 2 (ticking only suggested default: class): www.smartinvestor.in##.pc_1_423.pc_box

Is there a way to have a more focused rule?

TIA
LorenzoC

Re: Making element hiding rule more specific?

Post by LorenzoC »

Try these two lines:
smartinvestor.in##.line_tb1.cL TR
smartinvestor.in##H2.fL.w200

(they will hide the "messageboard" title and the table rows)
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Re: Making element hiding rule more specific?

Post by Ares2 »

vasa1 wrote:Is there a way to have a more focused rule?
Yes, there is. What you have to do is you click the "Advanced view" button in the selector window. You will get a list of the sites' structure (you might have to make the window/area larger to see it). It includes your selected element (at the very bottom) and elements that precede your selected element (silbling and parent nodes). Now you just have to click one or more of them and select an attribute to define them on the right.

As a rule of thumb, just go from the bottom up and click id's, classes, etc. until the rule only hides the desired element. In your example, one could come up with a rule like this:

Code: Select all

smartinvestor.in##.pc_1_423.pc_box + .pc_2_250.pc_box + .pc_3_250 + .pc_clear + .pc_1_423.pc_box
vasa1
Posts: 76
Joined: Wed Apr 14, 2010 8:59 am

Re: Making element hiding rule more specific?

Post by vasa1 »

Ares2 wrote:...
Yes, there is. What you have to do is you click the "Advanced view" ...
Thanks Lorenzo and Ares2 :) .

@Ares2, you've given me a new toy. I didn't notice it at all :oops: At first glance, it seems to be a far more convenient and easy to use tool than Dom Inspector, at least for the specific purpose of making element-hiding rules. Thanks once again for pointing it out.
Locked