I have a very specific situation here that I can't find anywhere else.
I need to point to a <link>
element that contains the rel="me"
attribute AND an href="https://www.example.com/profile/12345"
attribute that CONTAINS 12345
.
<link rel="me" href="https://www.example.com/profile/12345"/>
I tried with document.querySelectorAll()
but I don't know how to format it to make the AND
operator work.
if (document.querySelectorAll('[rel="me"], a[href*=123456]')[0])
Any ideas on how to do this?