content-handler rewrite
commit4bfcc512ee27e3096d72ad403fd293316c585a6c
authorJohn Foerch <jjfoerch@earthlink.net>
Mon, 12 Oct 2009 21:00:06 +0000 (12 17:00 -0400)
committerJohn Foerch <jjfoerch@earthlink.net>
Mon, 12 Oct 2009 21:00:06 +0000 (12 17:00 -0400)
tree8c49f0d28c408c73040b030c33cb62c269f3655a
parent818b72f345efd0a263924c85e5c0fbe524aaaffa
content-handler rewrite

The main thing in this patch is a restructuring of download_helper which
makes each individual action for content of unknown mime types available
as its own function.  The user can then configure automation on a per-
mime-type basis, with the new variable, content_handlers.

mime_type_external_handlers was removed, and replaced by a rewritten api
embodied in the variable external_content_handlers.  This was done in
order to generalize the api used by that variable to make it also
useful for the new content_handlers variable.  The old api was also
overcomplex.  See http://bugs.conkeror.org/issue170

The api for external_content_handlers works like this:

  external_content_handlers.set("application/pdf", "xpdf");
  external_content_handlers.set("image/*", "feh);

The api for content_handlers works similarly:

  content_handlers.set("application/pdf", content_handler_save);
modules/commands.js
modules/conkeror.js
modules/content-handler.js [new file with mode: 0644]
modules/download-manager.js
modules/load-spec.js
modules/mime.js
modules/minibuffer-read-mime-type.js