1

There's a way to apply CSS to a html tags where its link is a visited URL on the Chrome browser. It's a pseudo CSS :visited.

a:visited{
   color: red !important;
}

What I want to do is to check if the a tag is a visited one or not, aka it has :visited or not.

I need this because later I can use that information for Tampermonkey or uBlock, so I need to be able to identity which a tags are visited or not through its html.

So, is it possible to make the html like this below with a JS?

// from this
<a target="_blank">a boring page I haven't visited yet</a>
<a target="_blank">an interesting page I already visited</a>
// to this
<a target="_blank">a boring page I haven't visited yet</a>
<a target="_blank visited">an interesting page I already visited</a>
  • Mybe this can help you https://stackoverflow.com/questions/7290959/how-can-i-detect-visited-and-unvisited-links-on-a-page – amel Dec 23 '22 at 08:45

0 Answers0