Skip to content

Instantly share code, notes, and snippets.

@trieloff
Created January 19, 2010 13:15
Show Gist options
  • Save trieloff/280923 to your computer and use it in GitHub Desktop.
Save trieloff/280923 to your computer and use it in GitHub Desktop.
<style>
a.tracklink:visited {color:black!important;display:none;}
a.tracklink:link {color:white!important;;display:none;}
</style>
<script>
function isVisited(url) {
var link_el = document.createElement('a');
link_el.innerHTML = "-";
link_el.className = "tracklink";
link_el.href = url;
document.body.appendChild(link_el);
var computed_style = document.defaultView.getComputedStyle(link_el, "");
if (computed_style.getPropertyValue("color") == 'rgb(0, 0, 0)') {
return true;
}
return false;
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment