[Greasemonkey] [Help]How to replace an js method or event?
Matt Labrum
darktempler at gmail.com
Thu Oct 6 04:02:39 EDT 2005
maybe using listening for the keydown event would be better?
addEventListener("keydown",function ,false);
On 10/6/05, weide <wideweide at gmail.com> wrote:
>
> on 2005-10-6 0:27,Jeremy Dunck said the following:
> > On 10/5/05, Jeremy Dunck <jdunck at gmail.com> wrote:
> >
> >
> >> bookpage, prevpage, nextpage are something page-specific too...
> >>
> >
> > ...
> > Sorry, I see the var defs now.
> >
> > Try this:
> >
> > unsafeWindow.document.onkeydown=function(e) {
> > if (e.keyCode==13)
> > location=bookpage
> > if (e.keyCode==37)
> > location=prevpage
> > if (e.keyCode==39)
> > location=nextpage
> > }
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
> >
> Thanks for your help.
> I test the code in firefox 1.07 with greasemonkey0.5.3,It is OK.
> But when I use in firefox 1.5b1 with greasemonkey0.6.2,it is not work.
> I think the question is that greasemonkey 0.6.2 is not work well...
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
More information about the Greasemonkey
mailing list