grg*_*lyk 9 syntax adblock browser-addons
如何在uBlock Origin中使用通配符?我试图弄清楚该怎么做,但我有些困惑。我只想将所有这些规则简化为一个规则:
www.dailymail.co.uk###js-article-text > div:nth-of-type(2) > div:nth-of-type(2)
www.dailymail.co.uk###js-article-text > div:nth-of-type(2) > div:nth-of-type(3)
www.dailymail.co.uk###js-article-text > div:nth-of-type(2) > div:nth-of-type(4)
www.dailymail.co.uk###js-article-text > div:nth-of-type(2) > div:nth-of-type(5)
www.dailymail.co.uk###js-article-text > div:nth-of-type(2) > div:nth-of-type(6)
www.dailymail.co.uk###js-article-text > div:nth-of-type(2) > div:nth-of-type(7)
www.dailymail.co.uk###js-article-text > div:nth-of-type(2) > div:nth-of-type(9)
www.dailymail.co.uk###js-article-text > div:nth-of-type(2) > div:nth-of-type(10)
Run Code Online (Sandbox Code Playgroud)
是否可以给出一定范围的数字或特定数字的列表,或者仅给出一个星号?谢谢!
小智 5
您可以使用'odd'和'even'作为占位符:
www.dailymail.co.uk###js-article-text > div:nth-of-type(even) > div:nth-of-type(even)
www.dailymail.co.uk###js-article-text > div:nth-of-type(even) > div:nth-of-type(odd)
Run Code Online (Sandbox Code Playgroud)
参见https://www.w3schools.com/cssref/sel_nth-of-type.asp
您可能可以使用算术公式表示所需的块。例如,要阻止除第一个元素以外的所有元素,请使用nth-of-type(n+2)。显然,n从开始0的,所以阻止将跳过第一个元素,但阻止一切之后。
我用这个来阻止由神可怕的网站自动加载的文章,那些使用了“层出不穷”的方法来读者参与...