[Conkeror] numberedlinks filtering
Mark Eichin
eichin at gmail.com
Sun Dec 2 17:23:30 PST 2007
I like the sound of that; it would both handle my cut&paste problem,
and avoid at least two cases recently where site-interaction bugs
turned out to be conkeror/numbered-links specific (one pre-release
thing at work; the other was hiveminder, where clicking "more" would
expand an entry and still say more, clicking "more" again would
contract it and then say "less"... in both cases, the javascript was
not handling having someone else fooling around with the DOM, but
that's not generally an unfair assumption :-)
On Dec 2, 2007 5:42 PM, Jeremy Maitin-Shepard <jeremy at jeremyms.com> wrote:
>
> "Mark Eichin" <eichin at gmail.com> writes:
>
> > I've been using conkeror on an EEEpc a bunch lately, which is a
> > distinctly underpowered box, so I'd like to have numberedlinks not
> > even trigger on some link-heavy pages (which it isn't going to be that
> > useful on anyway.) In particular, hiveminder (task.hm/hiveminder.com)
> > which is a *very* link-heavy page - but once I have the hook I might
> > as well turn it off for gmail and wunderground (more because it causes
> > layout problems, there.)
>
> > For now I'm using
>
> > saved_numberedlinks_resize = numberedlinks_resize
> > function numbered_links_filter(cont) {
> > url = cont.document.commandDispatcher.focusedWindow.location.href;
> > alert("NLF: " + url);
> > if (url.match("hiveminder.com")) { return; }
> > if (url.match("wunderground.com")) { return; }
> > if (url.match("mail.google.com")) { return; }
> > return saved_numberedlinks_resize (cont);
> > }
>
> > numberedlinks_resize = numbered_links_filter
>
> > but this isn't working on multiple m-x reinit's; I'd modified
> > nl_document_observer instead but that's only one triggering case, not
> > all of them. Is this at least the right approach? Am I just confusing
> > javascript too much with other languages and I should patch
> > numberedlinks_resize directly in numberedlinks.js?
>
> Probably that is more likely to work. I've found that attempting to
> redefine functions doesn't always have the desired effect. I think
> JavaScript somehow binds the names to the actual function in some cases
> sooner, and therefore the redefinition won't work.
>
> I hope to soon (maybe after a few weeks when I have more time) implement
> a better numbered links that will be faster and support hooks like this
> to disable it in some cases.
>
> In particular, borrowing from vimperator's new link system, the idea is
> to only display link numbers after entering a command to start entering
> a link identifier, then display all of the numbers floating so that they
> don't affect the layout, and only display numbers for the visible links
> so that it is fast and the numbers don't get to be too high, and allow
> the user to type either the number of the link or some of the text of
> the link.
>
> This might make it unnecessary to disable the numbers on certain sites
> anyway.
>
> --
> Jeremy Maitin-Shepard
>
--
_Mark_ <eichin at thok.org> <eichin at gmail.com>
More information about the Conkeror
mailing list