I should package up the "save urls" and clip-service hacks someday...
a few smaller things, though:
// warn about open window count before quitting
function safe_quit()
{
numwins = getBrowser().getBrowserNames().length;
if (numwins > 1) {
if(confirm(numwins + " windows open, quit anyway?")) {
quit();
}
} else {
quit();
}
}
add_command("quit", safe_quit, []);
define_key(top_kmap, make_key("q",MOD_CTRL),"quit");
define_key(ctrlx_kmap, make_key("c",MOD_CTRL),"quit");
// in emacs, I make c-x c-k kill this buffer without confirmation.
// however, conkeror wouldn't let me kill the last buffer on a frame,
// this causes the frame to go away too if it's the last one.
// needs a case for last buffer on last frame, but didn't know how to
// detect that -- but at least if you do that you're not losing
// anything :-)
function nuke_browser()
{
if (getBrowser().getBrowserNames().length > 1) {
getBrowser().killCurrentBrowser();
} else {
// what delete_frame does directly:
window.close()
}
}
add_command("nuke-buffer", nuke_browser, []);
define_key(ctrlx_kmap, make_key("k",MOD_CTRL),"nuke-buffer");
--
_Mark_ <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
_______________________________________________
Conkeror mailing list
[email protected]
http://mozdev.org/mailman/listinfo/conkeror