1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
// vim:ft=javascript
require("theme.js");
theme_load_paths.unshift("~/.conkeror/");
theme_unload("default");
theme_load("theme");
//theme_load("conkeror-theme-zenburn");
require("session.js");
session_auto_save_auto_load = true;
require("favicon.js");
require("new-tabs.js");
tab_bar_show_icon = true;
tab_bar_show_index = false;
require("clicks-in-new-buffer.js");
require("opensearch.js");
define_opensearch_webjump("?", "duckduckgo.xml");
define_opensearch_webjump("?g", "google.xml");
define_opensearch_webjump("?w", "wikipedia.xml");
define_opensearch_webjump("?e", "eBay.xml");
url_completion_use_history = true;
url_remoting_fn = load_url_in_new_buffer;
download_buffer_automatic_open_target = OPEN_NEW_BUFFER_BACKGROUND;
// Set zoom to 90% (this is normal zoom don't know why default seems to be 110% or so.
session_pref("layout.css.devPixelsPerPx", "0.9");
/////////////////////////////////////////////////////////////////////////////////
// reopening closed buffers
var my_closed_buffers = new Array();
//save the URL of the current buffer before closing it
interactive("my-close-and-save-current-buffer",
"close and save the current buffer for later restore",
function(I) {
if(my_closed_buffers.length==10){
my_closed_buffers.shift(); // remove older item to save
// memory, just save maximum 10 buffers
}
my_closed_buffers.push(I.buffer.document.URL);
kill_buffer(I.buffer); //kill the current buffer
});
undefine_key(default_global_keymap, "q");
define_key(default_global_keymap, "q", "my-close-and-save-current-buffer");
interactive("my-open-closed-buffer",
"open the last closed buffer",
function(I){
// check if the array length > 0
if(my_closed_buffers.length>0){
// load the URL in new windows
load_url_in_new_buffer(
my_closed_buffers[my_closed_buffers.length - 1], I.window);
// remove the first item in the array
my_closed_buffers.pop();
}
});
define_key(default_global_keymap, "A-W", "my-open-closed-buffer")
/////////////////////////////////////////////////////////////////////////////////
|