
Loading…
Question - two custom filters #1483
lencc
commented
Collaborator
AlexVallat
commented
Is this really Firefox-specific? It seems unlikely.
gwarser
commented
-
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
lencc
commented
@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.
gorhill
commented
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 > [...]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I came across 2 rules, here are the examples:
1)
ekipa24.si###banner12)
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-addboxIn 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-"]andekipa24.si##banner[id^="-"]But it doesn't work.