Skip to content

Instantly share code, notes, and snippets.

@belst-n
Created December 12, 2024 06:10
Show Gist options
  • Save belst-n/ae56936ae51c933967ac225467eb4b6d to your computer and use it in GitHub Desktop.
Save belst-n/ae56936ae51c933967ac225467eb4b6d to your computer and use it in GitHub Desktop.
Brace 1.73 Procedural Cosmetic Filter Rules Test Examples 12/11/2024
!
! Title: brave-core PR #24688
!
! Filter to be used for testing purposes
! https://testcases.agrd.dev
!
! Customized for https://github.com/brave/brave-core/pull/24688
!
! Hide warning
antonok.com,testcases.agrd.dev,pages.dev###subscribe-to-test-extended-css-rules-filter
!
antonok.com,testcases.agrd.dev,pages.dev#?##case1.banner:has(a.banner-link)
antonok.com,testcases.agrd.dev,pages.dev#?##case2.banner:contains(Click Me!)
antonok.com,testcases.agrd.dev,pages.dev#?##case3.banner:matches-css(opacity: 0.9)
antonok.com,testcases.agrd.dev,pages.dev#?##case4.banner:matches-css-after(content: sponsored)
antonok.com,testcases.agrd.dev,pages.dev#?##case5.banner:matches-css-before(content: sponsored)
antonok.com,testcases.agrd.dev,pages.dev#?##case6.banner:has-text(You would want to click me for sure!)
antonok.com,testcases.agrd.dev,pages.dev#?##case7.banner:-abp-has(a.banner-link)
antonok.com,testcases.agrd.dev,pages.dev#?##case8.banner:contains(Click Me!)
antonok.com,testcases.agrd.dev,pages.dev#?##case9.banner:contains(/[aа]{20,}/)
antonok.com,testcases.agrd.dev,pages.dev#?##case10.banner:matches-css(background-image: /url\(data\:image\/svg\+xml;base64,[A-Za-z0-9]{100,}/)
antonok.com,testcases.agrd.dev,pages.dev#?##case11.banner:matches-css-after(background-image: /url\(data\:image\/svg\+xml;base64,[A-Za-z0-9]{100,}/)
antonok.com,testcases.agrd.dev,pages.dev#?##case12.banner:matches-css-before(background-image: /url\(data\:image\/svg\+xml;base64,[A-Za-z0-9]{100,}/)
antonok.com,testcases.agrd.dev,pages.dev#?#body #case13.banner[-ext-has="a.banner-link"]
antonok.com,testcases.agrd.dev,pages.dev#?#.container > #case14.banner[-ext-contains="/[aа]{20,}/"]
antonok.com,testcases.agrd.dev,pages.dev#?##case14 + #case15.banner[-ext-matches-css-after="content:sponsored"]
antonok.com,testcases.agrd.dev,pages.dev#?##case1 ~ #case16.banner[-ext-matches-css-before="content:sponsored"]
antonok.com,testcases.agrd.dev,pages.dev#?#*:contains(/absolute[\s\S]*-\d{4}/) + * > .banner:contains(/а/) ~ #case17.banner:has(> div:contains(/а/):nth-child(100n + 2))
antonok.com,testcases.agrd.dev,pages.dev#?#.test-xpath-case18:xpath(//*[@class="test-case18-div"]/../..)
antonok.com,testcases.agrd.dev,pages.dev#?#.test-nth-ancestor-case19:nth-ancestor(3)
antonok.com,testcases.agrd.dev,pages.dev#?#.test-upward-selector:upward(#case20)
antonok.com,testcases.agrd.dev,pages.dev#?#.test-upward-number-case21:upward(4)
! Case 22
antonok.com,testcases.agrd.dev,pages.dev#?##inframe1:has(.content)
!
antonok.com,testcases.agrd.dev,pages.dev#?##case23 > div:contains(/kick me!|\(18\+\)|https:\/\/vk.cc|testTEXT|vk.com\/test_id/)
antonok.com,testcases.agrd.dev,pages.dev#?##case24 > div:matches-attr("/^data-.{4}$/"="/banner/")
antonok.com,testcases.agrd.dev,pages.dev#?##case25 > div:matches-property("id"="/property-match/")
antonok.com,testcases.agrd.dev,pages.dev#?##case26:remove()
antonok.com,testcases.agrd.dev,pages.dev#$?##case27:has(div) { remove: true; }
antonok.com,testcases.agrd.dev,pages.dev#?##case28 > :is(.case28, #main, footer, span):contains(isTest)
!
! Case 29
antonok.com,testcases.agrd.dev,pages.dev#?##case29.banner:has(a.banner-link)
antonok.com,testcases.agrd.dev,pages.dev#@?##case29.banner:has(a.banner-link)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment