[Greasemonkey] Colour-coding of visited links

Henrik Nyh henrik at nyh.se
Wed Oct 4 05:34:04 PDT 2006


esquifit wrote:
> You can compare the computed style[1] of a link against one you are
> sure it has not been visited, for example a hidden dummy link added by
> your script.
> 
> [1] http://developer.mozilla.org/en/docs/DOM:window.getComputedStyle

A simpler solution would be to set the color-coded links using CSS (with 
e.g. http://greasemonkey.mozdev.org/authoring.html#GM_addStyle).

You'd probably want to use :visited and friends 
(http://www.w3schools.com/css/css_pseudo_classes.asp) and possibly 
!important (http://www.w3.org/TR/REC-CSS2/cascade.html#important-rules).

-- 
Henrik Nyh
http://henrik.nyh.se

> 
> 2006/10/4, Edward Hibbert <Edward.Hibbert at dataconnection.com>:
>> I have a script which colour-codes links.  This is interfering with the
>> native colour-coding of a link based on whether you've visited it before
>> - the native colour-coding is overwritten by mine.
>>
>> Is there any way for me to tell inside a script whether the link has
>> been visited, so that I can modify my colour-coding accordingly?
>> _______________________________________________
>> Greasemonkey mailing list
>> Greasemonkey at mozdev.org
>> http://mozdev.org/mailman/listinfo/greasemonkey
>>
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey


More information about the Greasemonkey mailing list