welcome: please sign in

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
What program is the main source of Conkeror's design philosophy?

location: ProtocolHandlers

1. set_protocol_handler

Protocol handlers are configured with set_protocol_handler. You can configure a protocol to be handled internally, externally, or to prompt for an external handler. The call form looks like this:

set_protocol_handler(protocol, handler);

1.1. protocol

The protocol being configured. In other words, the scheme portion of the url, with no colon.

1.2. handler

Handle the protocol internally. That is, have Gecko try to handle it.
Prompt for a handler when attempting to open a link of this protocol.
an nsIFile

Use the executable indicated by the nsIFile as a handler. You can get an nsIFile from make_file or find_file_in_path.

a string
The string is a template url for a web service for handling this protocol. The sequence "%s" in the string will be replaced by the url-encoded url of the resource.

2. Notes

This kind of protocol handler only affects what happens when clicking on (or following) a hyperlink. It has no effect on reloading, or any commands that cause an url to be loaded in a new buffer or window, such as command-line remoting or clicks-in-new-buffer.

3. Examples

set_protocol_handler("mailto", make_file("~/bin/handle-mailto"));

set_protocol_handler("mailto", find_file_in_path("thunderbird"));

set_protocol_handler("mailto", "https://mail.google.com/mail/?extsrc=mailto&url=%s");

set_protocol_handler("magnet", find_file_in_path("transmission-gtk"));