set_protocol_handler: new util
commit176585294f41e15ad205701663eb31074d1dda50
authorJohn Foerch <jjfoerch@earthlink.net>
Fri, 16 Sep 2011 18:06:23 +0000 (16 14:06 -0400)
committerJohn Foerch <jjfoerch@earthlink.net>
Fri, 16 Sep 2011 18:06:23 +0000 (16 14:06 -0400)
tree172934b960c2ab9964998149d4a8cc211add6aec
parent825c7fcf0bd9ff18b77f7cfa685c6f3e31968803
set_protocol_handler: new util

This sets the protocol handler of a given protocol to either a local
program or a web service.  Its first argument is the protocol given as a
string.  The second argument can be null, an nsIFile, or a string.  Null
cancels any existing handler and will cause it to prompt next time.  An
nsIFile gives an external program to run as a handler with the url as its
argument.  Generally use 'make_file' or 'get_file_in_path' for this.  The
argument can also be a string that gives an url template for a web
service.  The sequence "%s" within this string will be substituted for the
url-encoded url.
modules/utils.js