General Usage

1. Select Current Page with Browser Object Commands

Certain commands (like 'copy', 'save' etc.) prompt for a link and show hint numbers; when you just want to select the url of the current buffer, you can just type 0 get it. Let us say you want to save the current buffer, just type the following

M-x save RET 0 RET

and you will be prompted to choose a file path. With that, you could also duplicate buffers, which is a function found in many browsers:

M-x follow-new-buffer RET 0

Note: This will not duplicate the state (like colum/line position etc.) of the buffer.

If you want to bind this to a key, you can use something like the following:

interactive("duplicate-buffer", "Duplicate buffer",
            function (I) {
              browser_object_follow(I.buffer, OPEN_NEW_BUFFER, I.buffer.current_uri.spec);
define_key(content_buffer_normal_keymap, "M-N", "duplicate-buffer");

2. Set Homepage to a File in the Home Directory

The following code is how to set your homepage to a file in your home directory, in a way that is cross-platform safe, without hard-coding the path.

On older xul/firefox version syntax is

let ( home = get_home_directory()) {
    homepage = home.path;

If you get an error on latest firefox 45.01 the following works

let home = get_home_directory();
    homepage = home.path;

3. Generate a PDF file

Useful for printing:

M-x print-buffer

4. Make each page's title available to copy to the clipboard

Note: gets the content of the title HTML tag enclosed within the page's head tag, not the value of the title attribute of other tags.

Add this browser object to your ConkerorRC:

    "page-title", "Get the title of the current page",
    function (I, prompt) {
        check_buffer(I.buffer, content_buffer);
        yield co_return(I.buffer.document.title);

define_key(content_buffer_normal_keymap, "* p", "browser-object-page-title");
// So `* p c` will copy the title of the current buffer