[Conkeror] my first command

Jim Burton jim at sdf-eu.org
Sun Aug 31 07:10:54 PDT 2008


Hi, I want a command that posts urls to citeulike.org (a bookmarking
type site for academic references). In firefox this is simply done
with a bookmark like this:


javascript:location.href='http://www.citeulike.org/posturl?username=USER&bml=nopopup&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);

I don't seem to be able to add such a bookmark -- is this because of
the protocol? So, I tried a command -- see below. This moves to the
new location but the minibuffer and status bar disappear and conkeror
stops responding to commands. I have to kill the window to start
again. What am I doing wrong? Thanks.

/*citeulike*/
function citeulike_post (i) {
    var w = i.window;
    w.location.href='http://www.citeulike.org/posturl?username=USER&bml=nopopup&url='+encodeURIComponent(w.location.href)+'&title='+encodeURIComponent(i.buffer.document.title);
}

interactive ("citeulike-post", "post the current location to citeulike",
    function (I) {
        citeulike_post (I);
    });

I'd like to tell you which version I'm using but don't know how to
find out! I got rid of the tarball, the version number doesn't seem to
be in any of the readmes etc and M-x conkeror-version prints
$CONKEROR_VERSION$, unhelpfully.

Jim


More information about the Conkeror mailing list