[Greasemonkey] Colour-coding of visited links
esquifit
esquifit at googlemail.com
Wed Oct 4 06:08:51 PDT 2006
If I understand correctly, the problem is here to *determine* whether
a given link has been clicked on or not. As far as I know, there is
no direct API for this in javascript, excepting the (admittedly
deficient) method I've suggested above.
2006/10/4, Henrik Nyh <henrik at nyh.se>:
> 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
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
More information about the Greasemonkey
mailing list