Fix Conkeror config for modern Firefox
This commit is contained in:
parent
6c3a9794ed
commit
a65d332001
2 changed files with 41 additions and 34 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
/*global require content_buffer session_token load_spec
|
||||||
|
* load_spec_uri_string add_hook */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
This script is a hack that provides delayed loading for content buffers.
|
This script is a hack that provides delayed loading for content buffers.
|
||||||
|
@ -7,6 +10,7 @@ returns the delayed url, not about:blank, so things like tabs and sessions
|
||||||
will still work properly.
|
will still work properly.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
require('session');
|
||||||
|
|
||||||
function content_delay (spec) {
|
function content_delay (spec) {
|
||||||
this.delayed_load = spec;
|
this.delayed_load = spec;
|
||||||
|
@ -45,5 +49,4 @@ function content_delay_do_initial_load (b) {
|
||||||
}
|
}
|
||||||
|
|
||||||
add_hook("create_buffer_early_hook", content_delay_init);
|
add_hook("create_buffer_early_hook", content_delay_init);
|
||||||
|
|
||||||
add_hook("select_buffer_hook", content_delay_do_initial_load);
|
add_hook("select_buffer_hook", content_delay_do_initial_load);
|
||||||
|
|
|
@ -1,23 +1,24 @@
|
||||||
require("content-policy.js");
|
require("content-policy.js");
|
||||||
require("favicon");
|
require("favicon");
|
||||||
require("session");
|
require("session");
|
||||||
require("github");
|
// require("github");
|
||||||
require("reddit");
|
// require("reddit");
|
||||||
|
|
||||||
let (home = get_home_directory()) {
|
function setup_load_paths() {
|
||||||
let (projects = home.clone(),
|
let home = get_home_directory(),
|
||||||
|
projects = home.clone(),
|
||||||
init = home.clone(),
|
init = home.clone(),
|
||||||
downloads = home.clone()) {
|
downloads = home.clone();
|
||||||
|
|
||||||
projects.append('projects');
|
projects.append('projects');
|
||||||
init.append('.conkerorrc');
|
init.append('.conkerorrc');
|
||||||
downloads.append('downloads');
|
downloads.append('downloads');
|
||||||
|
|
||||||
let (cdispass = projects.clone(),
|
let cdispass = projects.clone(),
|
||||||
site_js = init.clone(),
|
site_js = init.clone(),
|
||||||
page_modes = init.clone(),
|
page_modes = init.clone(),
|
||||||
themes = init.clone(),
|
themes = init.clone(),
|
||||||
search_engines = init.clone()) {
|
search_engines = init.clone();
|
||||||
|
|
||||||
cdispass.append('cdispass');
|
cdispass.append('cdispass');
|
||||||
site_js.append('site-js');
|
site_js.append('site-js');
|
||||||
|
@ -30,11 +31,10 @@ let (home = get_home_directory()) {
|
||||||
load_paths.push("file://" + page_modes.path);
|
load_paths.push("file://" + page_modes.path);
|
||||||
theme_load_paths.push(themes.path);
|
theme_load_paths.push(themes.path);
|
||||||
opensearch_load_paths.push(search_engines);
|
opensearch_load_paths.push(search_engines);
|
||||||
};
|
|
||||||
|
|
||||||
cwd = downloads;
|
cwd = downloads;
|
||||||
};
|
}
|
||||||
};
|
setup_load_paths();
|
||||||
|
|
||||||
require("cdispass");
|
require("cdispass");
|
||||||
require("jira");
|
require("jira");
|
||||||
|
@ -258,10 +258,10 @@ add_hook("before_quit_hook", oni_before_quit_func);
|
||||||
add_hook("content_policy_hook", content_policy_bytype);
|
add_hook("content_policy_hook", content_policy_bytype);
|
||||||
add_hook("mode_line_hook", mode_line_adder(buffer_count_widget));
|
add_hook("mode_line_hook", mode_line_adder(buffer_count_widget));
|
||||||
add_hook("mode_line_hook", mode_line_adder(buffer_icon_widget), true);
|
add_hook("mode_line_hook", mode_line_adder(buffer_icon_widget), true);
|
||||||
add_hook("mode_line_hook", mode_line_adder(downloads_status_widget));
|
// add_hook("mode_line_hook", mode_line_adder(downloads_status_widget));
|
||||||
add_hook('mode_line_hook', mode_line_adder(scuttle_bookmarked_widget));
|
add_hook('mode_line_hook', mode_line_adder(scuttle_bookmarked_widget));
|
||||||
|
|
||||||
remove_hook("download_added_hook", open_download_buffer_automatically);
|
// remove_hook("download_added_hook", open_download_buffer_automatically);
|
||||||
|
|
||||||
hints_minibuffer_annotation_mode(true);
|
hints_minibuffer_annotation_mode(true);
|
||||||
theme_load("yoshi");
|
theme_load("yoshi");
|
||||||
|
@ -341,10 +341,14 @@ read_url_handler_list = [read_url_github_command_handler,
|
||||||
read_url_duckduckbang_handler];
|
read_url_duckduckbang_handler];
|
||||||
|
|
||||||
// Mozrepl
|
// Mozrepl
|
||||||
let (mozrepl_init = get_home_directory()) {
|
function setup_mozrepl() {
|
||||||
|
let mozrepl_init = get_home_directory();
|
||||||
|
|
||||||
mozrepl_init.appendRelativePath(".mozrepl-conkeror.js");
|
mozrepl_init.appendRelativePath(".mozrepl-conkeror.js");
|
||||||
session_pref('extensions.mozrepl.initUrl', make_uri(mozrepl_init).spec);
|
session_pref('extensions.mozrepl.initUrl',
|
||||||
};
|
make_uri(mozrepl_init).spec);
|
||||||
|
}
|
||||||
|
setup_mozrepl();
|
||||||
|
|
||||||
if ('@hyperstruct.net/mozlab/mozrepl;1' in Cc) {
|
if ('@hyperstruct.net/mozlab/mozrepl;1' in Cc) {
|
||||||
let mozrepl = Cc['@hyperstruct.net/mozlab/mozrepl;1']
|
let mozrepl = Cc['@hyperstruct.net/mozlab/mozrepl;1']
|
||||||
|
|
Loading…
Reference in a new issue