Unfortunately, I can’t think of any. Twitter could arbitrarily change where those elements are placed in the DOM at any time (and they probably will to prevent other extensions from blocking promoted tweets). I would just consider this out of the scope of your project and not bother handling it.
Totally agreed, definitely out of scope. Just removed the script from the manifests. Thanks again!
You could potentially keep searching upwards for a parentNode that has role="article". While Twitter could change their markup significantly they sorta have to support screen readers so aria attributes will poke through here and there.
Hmmm interesting, if you have some time I'd love a PR. It would be a nice feature to have tbh
Thomas, I like your work. Just joined your newsletter. Would be interested to talk. I'm @ www.sendsmart.com