mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Mark links as visited when they get opened in new tabs/windows.
This commit is contained in:
parent
d7ce0ab4d3
commit
20fbf9bba3
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user