Click button with specific color using javascript

Amazing, @jack.chan

const elements = document.querySelectorAll("*");

for this line i dont want to loop all elements, i only want li elements where rel starts with “nofollow”, is that possible