Re:Twitter is at its best when verified accounts can’t tweet
by hombre_fatal on Thursday July 16, 2020 @11:50AM
(#23860213)
fwiw, node.closest(selector) lets you query up the tree for the first parent that matches.
Doesn't get the most top-level wrapper, but it also works well with retweets. Doesn't work with verified replies though (removes the verified tweet reply but not the other person's tweet), too lazy to look.
[ Parent
| on HN ]
Re:Twitter is at its best when verified accounts can’t tweet
by ihuman on Thursday July 16, 2020 @01:52PM
(#23861659)
I converted your code into a uBlock Origin filter. For replies, it also only removes the verified reply. I tried to get it to work, but I think that might be impossible with just CSS selectors.
twitter.com##[role="article"]:has([aria-label="Verified account"])
Re:Twitter is at its best when verified accounts can’t tweet
by sergeykish on Thursday July 16, 2020 @04:08PM
(#23863286)
uBlock Origin supports XPath
##:xpath(//*[@role="article"][descendant::*[@aria-label="Verified account"]])
Unfortunately no document.queryXPathAll but is easy to shim [2]. It is great technology, sadly not known.[1] https://developer.mozilla.org/en-US/docs/Web/CSS/:has
[2] http://sergeykish.com/web-api-element-prototype-queryxpathal...