Just a feature request:
it would be nice if the EHH could show the number of matches of a rule on a page.
For example, I am on a website which contains a banner has a fully random url and can only be hidden by
site.com##img[height="120"][width="130"]
To know if this filter doesn't cause any false-positives I have to check the full page if anything else does also disappear after adding that rule. [or simply assume it is correct and hope I'm not wrong]
However, it would be nice if there was a line 'This filter hides # items on this page'
I guess the most difficult part would be to exclude items inside hidden items, e.g. for ##.any not to count this two times:
<div class="any">
<div class="any thing else">
</div></div>
EHH: show number of hidden elements
Re: EHH: show number of hidden elements
Sounds like a good idea to me, over to future development.
Re: EHH: show number of hidden elements
I created another topic dealing with the same idea, without actually having a look at this one. I'm just dumping its content here for consistency:
----------------------------------------------------------------------
1) When hovering over the ABP icon, it tells us how many times each filter is used on the page, except for the hiding rules whose numbers of hits are always: (1)
Would it be possible to actually count the real number of hits on one webpage for hiding rules?
It would be highly useful for example for list maintainers, as this features could help to quickly check if a hiding rule being tested (especially the ones with exotic CSS selectors) is causing false positives - i.e. if it matches more times than intended - without having to crawl through the source code of the page, the CSS stylesheets, etc., or having to have a really sharp eye at the webpage content.
2) In the blockable items list, could a new row containing the number of hits could be added? As it wouldn't be useful for most users, it could be hidden by default.
----------------------------------------------------------------------
1) When hovering over the ABP icon, it tells us how many times each filter is used on the page, except for the hiding rules whose numbers of hits are always: (1)
Would it be possible to actually count the real number of hits on one webpage for hiding rules?
It would be highly useful for example for list maintainers, as this features could help to quickly check if a hiding rule being tested (especially the ones with exotic CSS selectors) is causing false positives - i.e. if it matches more times than intended - without having to crawl through the source code of the page, the CSS stylesheets, etc., or having to have a really sharp eye at the webpage content.
2) In the blockable items list, could a new row containing the number of hits could be added? As it wouldn't be useful for most users, it could be hidden by default.
Author of Liste FR, an ad-blocking subscription for French websites
Re: EHH: show number of hidden elements
To my knowledge, the element-hiding rules are the equivalent of injecting a huge block of CSS selectors followed by {display:none!important}, so there's no real concept of "hits"
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Re: EHH: show number of hidden elements
lewisje wrote:To my knowledge, the element-hiding rules are the equivalent of injecting a huge block of CSS selectors followed by {display:none!important}, so there's no real concept of "hits"
Code: Select all
document.querySelectorAll("filter_part-after_the_##").length;
Sorry for the lack of replies, somehow this forum loses it's "Notify me when a reply is posted" setting when it's moved to another location
-
- Posts: 114
- Joined: Fri Dec 18, 2009 5:24 pm
- Location: Wonderful World, Ubuntu Linux
- Contact:
Re: EHH: show number of hidden elements
Why not just highlight borders of blocks which are going to be hidden while editing rule? As least it could be useful as a switch in EHH dialog.
Re: EHH: show number of hidden elements
In that case, you'd still first have to scroll the page to see where rules match. Secondly, I'd prefer to have a preview where the page looks as it would become after applying the rule rather than elements just being highlighted (since some pages mess up only after an element is actually hidden, especially top banners with fixed position menus are good at doing that). So I don't think that would be a good idea.Lain_13 wrote:Why not just highlight borders of blocks which are going to be hidden while editing rule? As least it could be useful as a switch in EHH dialog.
-
- Posts: 114
- Joined: Fri Dec 18, 2009 5:24 pm
- Location: Wonderful World, Ubuntu Linux
- Contact:
Re: EHH: show number of hidden elements
That's exactly why I proposed a switch between highlight and hide preview modes. In highlight mode you will see all matched elemetns and in hide mode you will see how page will looks like without them. Sometimes it's really hard to track down all changes on the page with just hide preview. Especially when you writing some crazy stuff like A:not([href*="..."]):not([href*="..."])>IMG...
Counter of actual hits would be nice to have but it wouldn't be much help.
Counter of actual hits would be nice to have but it wouldn't be much help.