Mark links as visited when they get opened in new tabs/windows.

This commit is contained in:
hyatt%netscape.com 2002-10-11 09:20:18 +00:00
parent d7ce0ab4d3
commit 20fbf9bba3

View File

@ -201,9 +201,17 @@
result = true;
}
if (result && linkNode && !linkNode.style.color)
linkNode.style.color = "-moz-visitedhyperlinktext";
if (result && linkNode) {
var computedOldColor = linkNode.ownerDocument.defaultView.getComputedStyle(linkNode,"").getPropertyValue("color");
var oldStyleColor = linkNode.style.color;
linkNode.style.color = "-moz-hyperlinktext";
var computedNewColor = linkNode.ownerDocument.defaultView.getComputedStyle(linkNode,"").getPropertyValue("color");
if (computedNewColor == computedOldColor)
linkNode.style.color = "-moz-visitedhyperlinktext";
else
linkNode.style.color = oldStyleColor;
}
// let someone else deal with it
return result;
}