Since browsers allow only very basic CSS on :visited
I created this way to check a user has clicked a link. If he clicks on any link, that has the class .trackVisit
the complete href is saved in an array in localStorage.
On each page visit and click on a link the script adds the class .visited
so we can style it however we want.
The links have e.preventDefault();
- so you can click them hassle free ;)