Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add conkeror config

  • Loading branch information...
commit 2ac1bfa46e398aef30bcfc70b503c662d3807173 1 parent 2f3b2b5
Lee Hinman authored

Showing 1 changed file with 169 additions and 0 deletions. Show diff stats Hide diff stats

  1. +169 0 .conkerorrc
169 .conkerorrc
... ... @@ -0,0 +1,169 @@
  1 +// the default page for new buffers.
  2 +homepage = "about:blank";
  3 +
  4 +
  5 +// load urls from the command line in new buffers instead
  6 +// of new windows.
  7 +url_remoting_fn = load_url_in_new_buffer;
  8 +
  9 +
  10 +// load download buffers in the background in the current
  11 +// window, instead of in new windows.
  12 +download_buffer_automatic_open_target = OPEN_NEW_BUFFER_BACKGROUND;
  13 +
  14 +
  15 +// save a keystroke when selecting a dom node by number.
  16 +// hints_auto_exit_delay = 750;
  17 +// hints_ambiguous_auto_exit_delay = 750;
  18 +
  19 +
  20 +// display properties of the current selected node during
  21 +// the hints interaction.
  22 +hints_display_url_panel = true;
  23 +
  24 +
  25 +// default directory for downloads and shell commands.
  26 +cwd = get_home_directory();
  27 +cwd.append("Downloads");
  28 +
  29 +
  30 +// automatically handle some mime types internally.
  31 +content_handlers.set("application/pdf", content_handler_save);
  32 +
  33 +
  34 +// let xkcd-mode put the funny alt text into the page.
  35 +xkcd_add_title = true;
  36 +
  37 +// sessions
  38 +require("session.js");
  39 +session_auto_save_auto_load = true;
  40 +
  41 +// keys
  42 +define_key(content_buffer_normal_keymap, "M-left", "back");
  43 +define_key(content_buffer_normal_keymap, "M-right", "forward");
  44 +
  45 +
  46 +// Don't let kill-buffer close the window
  47 +can_kill_last_buffer = false;
  48 +
  49 +
  50 +// from Phil
  51 +// -*- Mode: espresso -*-
  52 +
  53 +interactive("fill-domain", "Fill the minibuffer with the current domain.",
  54 + function (I) {
  55 + var field = I.minibuffer.input_element;
  56 + var paths = String(I.window.content.location).split('/');
  57 + var domain = paths[0] + "/" + paths[1] + "/" + paths[2] + "/";
  58 + field.value = domain;
  59 + });
  60 +
  61 +define_key(minibuffer_keymap, "C-/", "fill-domain");
  62 +
  63 +interactive("tinyurl", "Create a TinyURL for the current URL",
  64 + function(I) {
  65 + I.window.content.location.href = 'http://tinyurl.com/create.php?url=' +
  66 + encodeURIComponent(I.window.content.location.href);
  67 +});
  68 +
  69 +interactive("instapaper", "Add current page to instapaper",
  70 + function(I) {
  71 + var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://www.instapaper.com/b',l=d.location,e=encodeURIComponent,p='?v=4&k=AID0XqXcLEdQ&u='+e(l.href) +'&t='+e(d.title) +'&s='+e(s),u=f+p;try{if(!/^(.*\.)?instapaper([^.]*)?$/.test(l.host))throw(0);iptstbt();}catch(z){a =function(){if(!w.open(u,'t','toolbar=0,resizable=0,status=1,width=250,height=150'))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();}
  72 + });
  73 +
  74 +define_webjump("hub", "http://github.com/search?q=%s");
  75 +define_webjump("g", "https://ssl.scroogle.org/cgi-bin/nbbwssl.cgi?Gw=%s");
  76 +define_webjump("w", "http://www.google.com/search?q=wikipedia+%s&btnI=I'm Feeling Lucky");
  77 +define_webjump("e", "http://www.google.com/cse?cx=004774160799092323420%3A6-ff2s0o6yi&q=%s&sa=Search");
  78 +define_webjump("mvn", "http://jarvana.com/jarvana/search?search_type=project&project=%s");
  79 +define_webjump("unfuddle", "https://sonian.unfuddle.com/projects/21988/tickets/by_number/%s");
  80 +define_webjump("safe", "https://agilezen.com/project/12433/story/%s");
  81 +define_webjump("sys", "https://agilezen.com/project/12254/story/%s");
  82 +define_webjump("ws", "https://agilezen.com/project/12170/story/%s");
  83 +
  84 +key_bindings_ignore_capslock = true;
  85 +url_remoting_fn = load_url_in_new_buffer;
  86 +url_completion_use_history = true;
  87 +url_completion_use_bookmarks = false;
  88 +can_kill_last_buffer = false;
  89 +download_buffer_automatic_open_target = OPEN_NEW_BUFFER_BACKGROUND;
  90 +
  91 +register_user_stylesheet(
  92 + "data:text/css,"+
  93 + escape("#minibuffer, tree.completions, .mode-line { font-family: Inconsolata; font-size: 9pt; }"));
  94 +
  95 +register_user_stylesheet(
  96 + "data:text/css," +
  97 + escape (".topsearch input { width: 2em; };"));
  98 +
  99 +interactive("toggle-stylesheets",
  100 + "Toggle whether conkeror uses style sheets (CSS) for the " +
  101 + "current buffer. It is sometimes useful to turn off style " +
  102 + "sheets when the web site makes obnoxious choices.",
  103 + function(I) {
  104 + var s = I.buffer.document.styleSheets;
  105 + for (var i = 0; i < s.length; i++)
  106 + s[i].disabled = !s[i].disabled;
  107 + });
  108 +
  109 +require("page-modes/google-search-results.js");
  110 +auto_mode_list.push([build_url_regex($domain = /google\.com/),
  111 + google_search_results_mode]);
  112 +
  113 +user_pref('extensions.mozrepl.autoStart', true);
  114 +
  115 +interactive("readability_arc90",
  116 + "Readability is a simple tool that makes reading on the web more enjoyable by removing the clutter around what you are reading",
  117 + function readability_arc90(I) {
  118 + var document = I.window.buffers.current.document;
  119 +
  120 + var readConvertLinksToFootnotes = false;
  121 + var readStyle = 'style-newspaper';
  122 + var readSize = 'size-medium';
  123 + var readMargin = 'margin-wide';
  124 +
  125 + var _readability_readStyle = document.createElement('SCRIPT');
  126 + _readability_readStyle.text = 'var readStyle = \'' + readStyle + '\';';
  127 + document.getElementsByTagName('head')[0].appendChild(_readability_readStyle);
  128 +
  129 + var _readability_readSize = document.createElement('SCRIPT');
  130 + _readability_readSize.text = 'var readSize = \'' + readSize + '\';';
  131 + document.getElementsByTagName('head')[0].appendChild(_readability_readSize);
  132 +
  133 + var _readability_readMargin = document.createElement('SCRIPT');
  134 + _readability_readMargin.text = 'var readMargin = \'' + readMargin + '\';';
  135 + document.getElementsByTagName('head')[0].appendChild(_readability_readMargin);
  136 +
  137 + var _readability_readConvertLinksToFootnotes = document.createElement('SCRIPT');
  138 + _readability_readConvertLinksToFootnotes.text = 'var readConvertLinksToFootnotes = ' + readConvertLinksToFootnotes + ';';
  139 + document.getElementsByTagName('head')[0].appendChild(_readability_readConvertLinksToFootnotes);
  140 +
  141 + var _readability_script = document.createElement('script')
  142 + _readability_script.type='text/javascript'
  143 + _readability_script.src='http://lab.arc90.com/experiments/readability/js/readability.js?x='+(Math.random())
  144 + document.documentElement.appendChild(_readability_script)
  145 +
  146 + var _readability_css = document.createElement('link')
  147 + _readability_css.rel = 'stylesheet'
  148 + _readability_css.href = 'http://lab.arc90.com/experiments/readability/css/readability.css'
  149 + _readability_css.type = 'text/css'
  150 + _readability_css.media = 'all'
  151 + document.documentElement.appendChild(_readability_css)
  152 +
  153 + var _readability_print_css = document.createElement('link')
  154 + _readability_print_css.rel = 'stylesheet'
  155 + _readability_print_css.href = 'http://lab.arc90.com/experiments/readability/css/readability-print.css'
  156 + _readability_print_css.media = 'print'
  157 + _readability_print_css.type = 'text/css'
  158 + document.getElementsByTagName('head')[0].appendChild(_readability_print_css)
  159 + });
  160 +
  161 +define_key(content_buffer_normal_keymap, "z", "readability_arc90");
  162 +
  163 +if ('@hyperstruct.net/mozlab/mozrepl;1' in Cc) {
  164 + var mozrepl = Cc['@hyperstruct.net/mozlab/mozrepl;1']
  165 + .getService(Ci.nsIMozRepl);
  166 + if (! mozrepl.isActive())
  167 + mozrepl.start(4242);
  168 +}
  169 +

0 comments on commit 2ac1bfa

Please sign in to comment.
Something went wrong with that request. Please try again.