3 ms·
Last I tried writing custom rules for Facebook was years ago, but they did have proper aria attributes, and uBlock origin does have selectors for text content.
by c-hendricks 2mo ago
Last I tried writing custom rules for Facebook was years ago, but they did have proper aria attributes, and uBlock origin does have selectors for text content. These are from 2020:
facebook.com##span:has-text(Suggested for You):xpath(../../../../../../../../../../../../../../../../../..)
facebook.com##div[aria-label="Sponsored"] span[aria-label="Sponsored"]:xpath(../../../../../../../../../../../../../../../../../../../../..)
facebook.com##div[aria-label="Sponsored"]:xpath(../../../../../../../../../../../../../../../../../../../..)
- pimlottc 2mo agoWhat's with the xpath selector? Is that just matching deeply nested elements?
- c-hendricks 2mo agoGoing from memory, but that's how many elements are in the tree between what I wanted to be hidden and where the matching text/elements actually lived.
- pimlottc 2mo agoOh jeez, I hadn’t thought about the blocked element being different than the aria-tagged one. What a nightmare
- ssdspoimdsjvv 2mo agoRead up on XPath axes:)
- aembleton 2mo agoyou can use upward. For example facebook.com##span:has-text(Suggested for You):upward(8) That then goes up elements in the dom.