Problem with element hiding helper
Problem with element hiding helper
Hi ppl!
There is a problem with the element hiding helper unfortunately! On some pages the desired data to hide is within a form which leads to that the tag to block is "TD", this however, blocks the whole page of course when it's constructed this way. Another addon for firefox called Remove Permenantly (wow nice spelling there!) CAN block stuff like this duje to that it's using "xpaths" instead. Maybe you should peek at this addon and incorporate this way of working? Actually, BOTH ways of working is good, so maybe a way to decide which is best?
or
is there something I'm missing here... try this page for an example: http://astalavista.box.sk/cgi-bin/robot?srch=test
Try hiding the top banner row, this results in a "TD" tag, which if used, hides the whole page.
Kristian
There is a problem with the element hiding helper unfortunately! On some pages the desired data to hide is within a form which leads to that the tag to block is "TD", this however, blocks the whole page of course when it's constructed this way. Another addon for firefox called Remove Permenantly (wow nice spelling there!) CAN block stuff like this duje to that it's using "xpaths" instead. Maybe you should peek at this addon and incorporate this way of working? Actually, BOTH ways of working is good, so maybe a way to decide which is best?
or
is there something I'm missing here... try this page for an example: http://astalavista.box.sk/cgi-bin/robot?srch=test
Try hiding the top banner row, this results in a "TD" tag, which if used, hides the whole page.
Kristian
Kristian Erik Tigersjäl
Re: Problem with element hiding helper
If you want to hide ALL the items in the top banner you can use:
astalavista.box.sk#DIV(style=border: 0px solid black; padding: 0pt; width: 100%; height: 20px; background-color: black;)
or an even better alternative:
astalavista.box.sk#FORM(name=linky)
Both of them will hide the whole top banner, including the selectors for searchers. If you only want to hide the "advertisement" part you can use:
astalavista.box.sk#DIV(id=inner)
I have obtained the three filters with the Element Hiding Helper extension, but you have to play with the wider/narrower functions until you can see an option which covers the ad zone and can easily identified.
You can also use something similar to XPATH using CSS with ABP-Element Hiding Helper, but in Advanced mode and you will need a lot of CSS knowledge (at least a lot more than me).
astalavista.box.sk#DIV(style=border: 0px solid black; padding: 0pt; width: 100%; height: 20px; background-color: black;)
or an even better alternative:
astalavista.box.sk#FORM(name=linky)
Both of them will hide the whole top banner, including the selectors for searchers. If you only want to hide the "advertisement" part you can use:
astalavista.box.sk#DIV(id=inner)
I have obtained the three filters with the Element Hiding Helper extension, but you have to play with the wider/narrower functions until you can see an option which covers the ad zone and can easily identified.
You can also use something similar to XPATH using CSS with ABP-Element Hiding Helper, but in Advanced mode and you will need a lot of CSS knowledge (at least a lot more than me).
It depends on the place you start to check. And you should use Advanced view, not the Basic one. And be careful because a little movement of the mouse can change the results when the elements are small, like these ones.
If you hover the mouse (after checking Select element to hide) over the green characters of the advertisment part of the banner you will obtain an anchor (a) element; with "w" (wider) you will obtain Font, and some Divs (in cascade, then a Form and then a Td (and the TR and TBody). With the red box showed you can have a general idea of the area covered by the elements. Then go back to the minimum element (in this case, the "a" element) and click. You can now check the elements in the tree displayed in the window, and see their atributes by clicking, because sometimes the label attached to the red box do not show all the atributes. A good example of this would be the "form" element with name=linky.
If you start the search hovering the mouse over the other boxes ("select a site", "forum", or the "box networks"), you will obtain a different sequence at the beginning, but at the end you always go to the div, form, td, tr and tbody elements.
At this moment you must try, select the element you think is the best one (the TD), repeat the process from the beginning and click when you display the selected element (TD). In the advanced window you can see the final result (with the prev view option checked) and if the selected element has "specific" atributes. In this case (TD) there is not any distinctive atribute, so you have to check with a new element. Simply click on Cancel instead of Add filter and start again. You can try with Form, and you will see that there is a specific atribute which probably will not be present in other parts of the page (name:linky). You can also want something more specific, in order to avoid the risk of false positives: try with the divs. When you have selected one of them, simply click on Add filter and the process is finished.
And rememember that you can always open the ABP preferences window, look for the filters you have added (into Element hiding elements, they will begin with "altavista") and remove them if you have made one (or more) mistakes.
I would advise you to try with some sites and "play" with the different possibilities, you can always remove the filters at the end.
If you hover the mouse (after checking Select element to hide) over the green characters of the advertisment part of the banner you will obtain an anchor (a) element; with "w" (wider) you will obtain Font, and some Divs (in cascade, then a Form and then a Td (and the TR and TBody). With the red box showed you can have a general idea of the area covered by the elements. Then go back to the minimum element (in this case, the "a" element) and click. You can now check the elements in the tree displayed in the window, and see their atributes by clicking, because sometimes the label attached to the red box do not show all the atributes. A good example of this would be the "form" element with name=linky.
If you start the search hovering the mouse over the other boxes ("select a site", "forum", or the "box networks"), you will obtain a different sequence at the beginning, but at the end you always go to the div, form, td, tr and tbody elements.
At this moment you must try, select the element you think is the best one (the TD), repeat the process from the beginning and click when you display the selected element (TD). In the advanced window you can see the final result (with the prev view option checked) and if the selected element has "specific" atributes. In this case (TD) there is not any distinctive atribute, so you have to check with a new element. Simply click on Cancel instead of Add filter and start again. You can try with Form, and you will see that there is a specific atribute which probably will not be present in other parts of the page (name:linky). You can also want something more specific, in order to avoid the risk of false positives: try with the divs. When you have selected one of them, simply click on Add filter and the process is finished.
And rememember that you can always open the ABP preferences window, look for the filters you have added (into Element hiding elements, they will begin with "altavista") and remove them if you have made one (or more) mistakes.
I would advise you to try with some sites and "play" with the different possibilities, you can always remove the filters at the end.
Thanks now I understand the process far better. I was not getting that linky form but I was looking at the wrong place at the page, nwo I get the same data as you do, great. One thing that CANNOT be removed though on this site is the right text ad cell, where it says "20mbit downloads" you can remove most of the text, but 3 lines remain to the right and they can't be removed in any smart way apart from removing the A's with the specific links but those will change of course.
Apart from that I got it all covered now!
Apart from that I got it all covered now!
Kristian Erik Tigersjäl
If you start by selecting any of the "a" elements and use the "wider" option, the sequence you obtain is:pluto2 wrote: One thing that CANNOT be removed though on this site is the right text ad cell, where it says "20mbit downloads" you can remove most of the text, but 3 lines remain to the right and they can't be removed in any smart way apart from removing the A's with the specific links but those will change of course.
a - body - html - iframe - p - td
If you select any of the body/html/iframe/p elements for the filter, you cannot remove the three last lines because they are part of a different p element, but included in the same td element (the last one of the previous sequence). You could try to filter these three lines with a different filter, but the "p" element does not have any "specific" atribute.
Then you should try the td element, just in case. You can see that it has a specific atribute (valign:top), but the atribute is too generic (there are other td elements in the page with valing:top, and they are also hidden) so when you test the filter a lot of the page is not displayed. But if you look carefully you can see that apart from valign:top you have another possibility: last child. Check it and the extension creates a filter which means more of less: select all the TD elements with valign:top AND being the last child of its parent element. It is not a very good filter, but for this page I think it works OK. If the page changed (including a new TD element at the right side which is the new last child, for example) or had a lot of subpages with TDs, maybe the filter does not work or, even worse, would hide something you do not want.
that was pretty much exactly what I came to conclude aswell. I ended up using the RIP extension instead for this tiny part. Since it's using xpaths it can handle this easier than elemnt hider helper, but I dunno if the xpath is alot "safer" than using last child, that was a neat idea in deed 
Kristian

Kristian
Kristian Erik Tigersjäl
Is this what you are trying to do .... just remove the entire last TD in the main page TABLE?
Code: Select all
astalavista.box.sk##td[width="640"] + td
You are right, I did not noticed that both the left column and the center part are included in TD elements with are also last childs of their respective parents and have the atribute valign:top (you can check it by yourself with the element hiding helper).pluto2 wrote:Actually, last child doesn't work. It seems to work when previewing the rule, but when reloading the page, the whole page is blanked and just black, can't figure out why though, ideas? I even added "top" attribute to the last child setting which produces the same result.
The best alternative is to use CSS rules if you know how to do it or using some other extension to find out the path. You can also try with element hiding helper combining elements, but the results are a little complicated and I am not sure if they are reliable:
* in order to hide the first P element (all the lines except the last three ones) you click on it, then select the P element (no atributes, only the element type), then click on the tree over the A element and select some atributes (I chose type A, target:blank and first child) and also click the TD parent element and some atributes of it: type: TD valign:top and last child.
The filter obtained would be:
astalavista.box.sk##TD[valign="top"]:last-child > A[target="_blank"]:first-child + P
* in order to hide the last three lines, it is possible to use a similar method for the P element, checking for example the first A element, and the TD parent element.
The second filter would be:
astalavista.box.sk##TD[valign="top"]:last-child > A[target="_blank"]:first-child + * + * + P
I am not sure if both of them are reliable in the long time, and probably they could be replaced for simpler filters checking the code, but at least they do the work.
EDIT: I had not read Rick's answer, a really simple and elegant solution. This is the difference between masters and common people

Rick, man, that's what I call an elegant solution, and Adum, that's what I call hard work
I do not really work alot with CSS so I wouldn't know a thing about this. Either way, the ads are now all gone on this page and I have some good knowledge now on how to fix other pages that annoy me!
Mmmm nice and clean!
Big thanks to both of you!!

Mmmm nice and clean!
Big thanks to both of you!!
Kristian Erik Tigersjäl