Browse Source

Various changes to conkeror

- switched to conkeror-git from the AUR
- changed font-size for mini-buffer and tabs
- enabled adblock extension
- added functions for browsing using a proxy

Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>
master
2 changed files with 59 additions and 1 deletions
  1. +1
    -1
      .conkeror.d/conkeror.css
  2. +58
    -0
      .conkerorrc

+ 1
- 1
.conkeror.d/conkeror.css View File

@@ -24,7 +24,7 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

* {
font: 13px Terminus;
font: 14px Terminus;
}

/* MINIBUFFER */


+ 58
- 0
.conkerorrc View File

@@ -58,6 +58,7 @@ xkcd_add_title = true; // insert alt text into the page

require("page-modes/reddit.js");
page_mode_activate(reddit_mode);
reddit_end_behavior = "page";

require("page-modes/duckduckgo.js");
page_mode_activate(duckduckgo_mode);
@@ -231,6 +232,10 @@ function firebug (I) {
}
interactive("firebug", "open firebug lite", firebug);

// use addblock plus extension; see: http://conkeror.org/AdblockPlus?highlight=%28adblock%29
// AdblockPlus currently not working (Aug 25, 2014)
require("extensions/adblockplus.js");

// Disable whitelist (Causes extensions from unknown/unsigned sites to silently fail if not enabled!)
//session_pref("xpinstall.whitelist.required", false);

@@ -246,6 +251,59 @@ add_hook("before_quit_hook",
yield co_return(result);
});

// Proxy code below from: http://conkeror.org/Tips?highlight=%28proxy%29#Proxy_Settings
// TODO: this proxy stuff still needs to be worked out (tor requires a SOCKS proxy)
// set the proxy server for this session only
proxy_server_default = "localhost";
proxy_port_default = 80;

function set_proxy_session (window, server, port) {
if (server == "N") {
session_pref('network.proxy.type', 0); //direct connection
window.minibuffer.message("Direction connection to the internet enabled for this session");
} else {
if (server == "") server = proxy_server_default;
if (port == "") port = proxy_port_default;

session_pref('network.proxy.ftp', server);
session_pref('network.proxy.gopher', server);
session_pref('network.proxy.http', server);
session_pref('network.proxy.socks', server);
session_pref('network.proxy.ssl', server);

session_pref('network.proxy.ftp_port', port);
session_pref('network.proxy.gopher_port', port);
session_pref('network.proxy.http_port', port);
session_pref('network.proxy.socks_port', port);
session_pref('network.proxy.ssl_port', port);

session_pref('network.proxy.share_proxy_settings', true);
session_pref('network.proxy.type', 1);

window.minibuffer.message("All protocols using "+server+":"+port+" for this session");
}
}

interactive("set-proxy-session",
"set the proxy server for all protocols for this session only",
function (I) {
set_proxy_session(
I.window,
(yield I.minibuffer.read($prompt = "server ["+proxy_server_default+"] or N: ")),
(yield I.minibuffer.read($prompt = "port ["+proxy_port_default+"]: ")));
});


// make hint numbers bigger; see: http://conkeror.org/Tips#Big_Hint_Numbers
// register_user_stylesheet(
// "data:text/css," +
// escape(
// "@namespace url(\"http://www.w3.org/1999/xhtml\");\n" +
// "span.__conkeror_hint {\n"+
// " font-size: 18px !important;\n"+
// " line-height: 18px !important;\n"+
// "}"));

//TODO: consider something like below to darken pages
function darken_page (I) {
var styles='* { background: black !important; color: grey !important; }'+


Loading…
Cancel
Save