[Conkeror] A tiny contribution

Silvio Levy levy at msri.org
Sun Aug 10 17:51:44 PDT 2008


Besides the options "s" or "o" (save or open) when you follow a link
to a file that cannot be displayed on the browser, I've felt the need
for an option "c" where you simply copy the URL in order to give it
to, say, wget, which offer better download scheduling control.

(You might ask, why not simply do "c NNN" before following the link?
This sometimes fails with the error message "TypeError: node is null",
while "f NNN" works fine. That's the case with the Download button of
Rapidshare, for example.)

I've implemented this functionality changing, in
modules/download-manager.js, the lines


                $prompt = "Action to perform: (save or open)",
                $options = ["s", "o"]);

            if (action == "s") {


to


                $prompt = "Action to perform: (save or open or copy-url)",
                $options = ["s", "o", "c"]);

            if (action == "c") {
                writeToClipboard (this.launcher.source.spec);
                action_chosen = true;
            }
            else if (action == "s") {


Although I know absolutely no Javascript, this my first slightly
nontrivial modification to conkeror took only 90 minutes :-) 
Which attests to conkeror's good design.

Thought I'd share it.

Best wishes,

Silvio




More information about the Conkeror mailing list