Added some conkerorrc stuff
This commit is contained in:
parent
637b897665
commit
8bd0382047
1 changed files with 100 additions and 1 deletions
101
.conkerorrc
101
.conkerorrc
|
@ -1,3 +1,102 @@
|
|||
// -*- mode: javascript -*-
|
||||
require("new-tabs.js");
|
||||
require("clicks-in-new-buffer-button.js");
|
||||
require("clicks-in-new-buffer.js");
|
||||
|
||||
// STYLE
|
||||
/*let (sheet = get_home_directory()) {
|
||||
sheet.append(".conkerorrc.d");
|
||||
sheet.append("stylesheets");
|
||||
sheet.append("tabs.css");
|
||||
register_user_stylesheet(make_uri(sheet));
|
||||
}*/
|
||||
function test(window)
|
||||
{
|
||||
var test = window.tab2-bar;
|
||||
window.buffers.container.removeChild(test);
|
||||
}
|
||||
|
||||
//add_hook("window_initialize_hook", test);
|
||||
|
||||
// VARIABLES
|
||||
// Make middle mouse button open new tab in background
|
||||
clicks_in_new_buffer_target = OPEN_NEW_BUFFER_BACKGROUND;
|
||||
|
||||
// WEBJUMPS
|
||||
define_webjump("delicious",
|
||||
"http://delicious.com/search?p=linux&lc=0&context=userposts%7Cslashed%7C",
|
||||
$alternative="http://delicious.com/slashed");
|
||||
define_webjump("gmail",
|
||||
"https://mail.google.com/mail/#search/%s");
|
||||
define_webjump("greader",
|
||||
"http://www.google.com/reader/view/#search/%s/");
|
||||
define_webjump("github",
|
||||
"http://github.com/search?q=%s",
|
||||
$alternative="http://github.com/ryuslash/");
|
||||
define_webjump("archwiki",
|
||||
"http://wiki.archlinux.org/index.php?search=%s");
|
||||
define_webjump("fedorawiki",
|
||||
"https://fedoraproject.org/wiki/search=%s");
|
||||
|
||||
// FUNCTIONS
|
||||
interactive("delicious-post",
|
||||
"bookmark the page via delicious",
|
||||
function (I) {
|
||||
check_buffer(I.buffer, content_buffer);
|
||||
let posturl = 'https://api.del.icio.us/v1/posts/add?&url=' +
|
||||
encodeURIComponent(
|
||||
load_spec_uri_string(
|
||||
load_spec(I.buffer.top_frame))) +
|
||||
"&description=" +
|
||||
encodeURIComponent(
|
||||
yield I.minibuffer.read(
|
||||
$prompt = "name (required): ",
|
||||
$initial_value = I.buffer.title)) +
|
||||
"&tags=" +
|
||||
encodeURIComponent(
|
||||
yield I.minibuffer.read(
|
||||
$prompt = "tags (space delimited): ")) +
|
||||
"&extended=" +
|
||||
encodeURIComponent(
|
||||
yield I.minibuffer.read(
|
||||
$prompt = "extended description: "));
|
||||
|
||||
try {
|
||||
var content = yield send_http_request(
|
||||
load_spec({uri: posturl}));
|
||||
I.window.minibuffer.message(content.responseText);
|
||||
} catch (e) { }
|
||||
});
|
||||
|
||||
interactive("delicious-post-link",
|
||||
"bookmar the link via delicious",
|
||||
function (I) {
|
||||
bo = yield read_browser_object(I);
|
||||
mylink = load_spec_uri_string(
|
||||
load_spec(encodeURIComponent(bo)));
|
||||
check_buffer(I.buffer, content_buffer);
|
||||
let postlinkurl = "https://api.del.icio.us/v1/posts/add?&yrl=" +
|
||||
mylink +
|
||||
"&description=" +
|
||||
encodeURIComponent(
|
||||
yield I.minibuffer.read(
|
||||
$prompt = "name (required): ",
|
||||
$initial_value = bo.textContent)) +
|
||||
"&tags=" +
|
||||
encodeURIComponent(
|
||||
yield I.minibuffer.read(
|
||||
$prompt = "tags (space delimited): ")) +
|
||||
"&extended=" +
|
||||
encodeURIComponent(
|
||||
yield I.minibuffer.read(
|
||||
$prompt = "extended description: "));
|
||||
|
||||
try {
|
||||
var content = yield send_http_request(
|
||||
load_spec({uri: postlinkurl}));
|
||||
I.window.minibuffer.message(content.responseText);
|
||||
} catch (e) { }
|
||||
}, $browser_object = browser_object_links);
|
||||
|
||||
// KEYMAPPINGS
|
||||
define_key(default_global_keymap, "p", "delicious-post");
|
||||
define_key(default_global_keymap, "P", "delicious-post-link");
|
Loading…
Reference in a new issue