programming-idioms icon indicating copy to clipboard operation
programming-idioms copied to clipboard

Color visited links

Open ghost opened this issue 6 years ago • 1 comments

Sometimes I will see a link that looks interesting and click it, only to discover that I have seen the page already. It would be helpful if we could color visited links. Here is my workaround, prog-idioms.user.css:

/*==userstyle==
@version 1.0.0
@namespace cup
@name Programming Idioms
==/userstyle==*/
@-moz-document domain("programming-idioms.org") {
   [href^="/idiom/"]:visited {
      color: hsl(270 100% 50%);
   }
}

ghost avatar May 25 '19 13:05 ghost

I don't remember having css to prevent the standard colorization of visited links (my custom css is here), but I acknowledge that they don't seem to be displayed differently than unvisited links.

A few things in no particular order:

  • Browsers prevent JS from doing whatever they want with visited links, for privacy reasons
  • Idioms have several valid URLs, e.g.
    • https://www.programming-idioms.org/idiom/107/get-folder-containing-current-program
    • https://www.programming-idioms.org/idiom/107
    • https://www.programming-idioms.org/idiom/107/get-folder-containing-current-program/2139/python
    • https://www.programming-idioms.org/idiom/107/impl/2139
  • The Language coverage page doesn't use the "canonical" URLs (1st form and 3rd form with titles), instead it uses the "raw" 2nd and 4th URL forms. Thus, a visited idiom may not be recognized as a visited link.

Deleplace avatar Sep 09 '19 07:09 Deleplace