Page modes, in the spirit of Emacs major modes and Greasemonkey scripts, allow site-specific functionality to be implemented in Conkeror.

Existing modes

Reddit mode

The reddit mode provides a 'cursor', represented by highlighting a specific reddit entry in green, which can be moved up and down to interact with reddit items.

The reddit commands are on reddit_keymap.

Gmail mode

Gmail mode mostly exists to stop the conkeror keybindings clashing with Gmail's. It moves the following keybindings:

If you don't like this, you could try enabling the Keyboard Shortcuts feature provided by Gmail Labs (Settings -> Labs) to move the Gmail keybindings to something that doesn't conflict, and changing your conkeror keybindings back. E.g. the following code restores 'g' to find-url:

define_key(gmail_keymap, "G", null, $fallthrough);
define_key(gmail_keymap, "g", "find-url");

The Gmail mode also provides C-c C-g, gmail-label-goto to jump to a specific label.

Google calendar mode

This exsits for similar reasons to Gmail mode. It moves the following commands:

To restore any of these commands, see the Gmail section, but use google_calendar_keymap instead of gmail_keymap.

Google maps mode

Google maps adds a few keyboard shortcuts for manipulating the map:

Google reader mode

Google reader is another mode for moving conflicting conkeror keybindings. It moves the following commands:

YouTube, Google Video, DailyMotion modes

These modes facilitate downloading and running external programs on the embedded videos from these websites. Conkeror has a built-in "media" browser object class that is selected by the "e" prefix key. This browser object class uses a "media scraper", which by default just looks for URLs matching certain patterns in the webpage HTML source code, in order to prepare a list of embedded media files from which the user can choose using the completion mechanism. These page modes override the default media scraper with a more sophisticated one that works correctly on those sites. Furthermore, they set the media browser object class to be the default browser object class for the save, shell-command, and shell-command-url commands. As a result, for example, the save command invoked without a prefix while one of these page modes is enabled will automatically choose the embedded flash video file as the target to download.

XKCD mode

The XKCD mode adds the title text of each image below the image itself.

Adding a new mode

PageModes (last edited 2008-09-17 19:44:59 by JeremyMaitinShepard)