Skip to content

Instantly share code, notes, and snippets.

@bavardage
Created May 25, 2009 21:06
Show Gist options
  • Save bavardage/117757 to your computer and use it in GitHub Desktop.
Save bavardage/117757 to your computer and use it in GitHub Desktop.
//tabs
require("new-tabs.js");
//webjumps
define_webjump("youtube", "http://www.youtube.com/results?search_query=%s&search=Search");
define_webjump("l", "http://dict.leo.org/ende?search=%s");
define_webjump("hoogle", "http://www.haskell.org/hoogle/?hoogle=%s");
define_webjump("hg", "http://www.google.com/codesearch?hl=en&q=lang%3Ahaskell+%s");
read_url_handler_list = [read_url_make_default_webjump_handler("google")];
//middle click
require("clicks-in-new-buffer.js");
clicks_in_new_buffer_target = OPEN_NEW_BUFFER_BACKGROUND;
//passwords
session_pref("signon.rememberSignons", true);
session_pref("signon.expireMasterPassword", false);
session_pref("signon.SignonFileName", "signons.txt");
Components.classes["@mozilla.org/login-manager;1"]
.getService(Components.interfaces.nsILoginManager);
//downloads
default_directory = get_home_directory();
add_hook("create_buffer_hook",
function (buf) {
buf.configuration.cwd = null;
});
download_buffer_automatic_open_target = OPEN_NEW_BUFFER_BACKGROUND;
//url completion
url_completion_use_bookmarks = false;
url_completion_use_history = true;
//xkcd
xkcd_add_title = true;
//get homepage worked out
can_kill_last_buffer = false;
homepage = "about:blank"
//handlers
mime_type_external_handlers = [[/^text\/.*$/, getenv("EDITOR")],
[/^image\/.*$/, "feh"],
[/^video\/.*$/, "mplayer"],
[/^audio\/.*$/, "mplayer"],
[/^application\/pdf$/, "epdfview"],
[/^application\/postscript$/, "gv"],
[/^application\/x-dvi$/, "xdvi"],
[/^.*$/, getenv("EDITOR")]];
//make links from terminals etc work nicely
url_remoting_fn = load_url_in_new_buffer;
//get extensions working?
session_pref("extensions.checkCompatibility", false);
//DNS Cache
session_pref("network.dnsCacheExpiration", 86400); // Default = 60
session_pref("network.dnsCacheEntries", 1000); // Default = 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment