Question - two custom filters
I came across 2 rules, here are the examples:
-
ekipa24.si###banner1 -
med.over.net###phorum > .main-container > .clearfix.box-holder > .span-3_2.span > .forum.box-full.box > .post-listing > .main-post.single-post:nth-of-type(5) > .clearfix.oglasnik-addbox
In the first case, I would like to replace "banner1" or "1" with universal character (i.e. with any number). In the second case, it is similar. I would like to replace number "5" (in this case it is in brackets).
I would like to have a single filter for each rule, if possible. I have tried to replace characters with [id^="-"]
For example: ekipa24.si##[id^="banner-"] and ekipa24.si##banner[id^="-"]
But it doesn't work.
Is this really Firefox-specific? It seems unlikely.
ekipa24.si##[id^="banner"]https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors- second is more complicated: https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-of-type tester: http://lea.verou.me/demos/nth.html
@AlexVallat it is most likely not Firefox specific. I changed the title.
However, I figured it out. In the second rule, the number (in this case "5") can be simply replaced with "n", since it can be any character. Therefore:
med.over.net###phorum > .main-container > .clearfix.box-holder > .span-3_2.span > .forum.box-full.box > .post-listing > .main-post.single-post:nth-of-type(n) > .clearfix.oglasnik-addbox
Thank you @gwarser for suggestions! The first rule you provided also works well.
In the second rule, the number (in this case "5") can be simply replaced with "n"
Simpler to just remove altogether the nth-of-type pseudoclass I suppose:
[...] > .main-post.single-post > [...]
@gorhill Correct. This is even better, because it allows me to delete some other subrules. Thanks!