2014-07-13 11:29:14 +00:00
"1.1
2014-07-16 05:29:20 +00:00
set runtimepath=~/etc/pentadactyl
2014-07-13 11:29:14 +00:00
loadplugins '\.(js|penta)$'
group user
2014-07-17 18:30:33 +00:00
set followhints=1
set noerrorbells novisualbell
js dactyl.beep = function() { return false; }
set hlfind incfind
" fast scrolling
2014-07-20 08:08:23 +00:00
map -builtin j 5j
map -builtin k 5k
2014-07-16 05:29:20 +00:00
set passkeys+=reader.gebner.org:u<C-Up><C-Down><Up><Down>,fr
2014-07-13 11:29:14 +00:00
2014-07-22 18:34:27 +00:00
set defsearch=g
2014-07-16 05:29:20 +00:00
silent qmark b javascript:if(top['bookmarklet-url@wallabag.org']){top['bookmarklet-url@wallabag.org'];}else{(function(){var%20url%20=%20location.href%20||%20url;window.open('https://wllbg.gebner.org/?action=add&url='%20+%20btoa(url),'_self');})();void(0);}
2014-07-13 12:45:27 +00:00
2014-07-16 19:08:20 +00:00
"" google translate
command trans -js <<EOF
let getParameterByName = function(url, name) {
let name = name.replace(/[\[]/, '\\\[').replace(/[\]]/, '\\\]');
let regexS = '[\\?&]' + name + '=([^&#]*)';
let regex = new RegExp(regexS);
let results = regex.exec(url);
if (results == null)
return '';
else
return decodeURIComponent(results[1].replace(/\+/g, ' '));
};
if (buffer.URL.spec.startsWith('http://translate.google.com/')) {
dactyl.open(getParameterByName(buffer.URL.spec, 'u'));
} else {
dactyl.open('http://translate.google.com/translate?hl=en&sl=auto&tl=en&u=' + encodeURIComponent(buffer.URL.spec));
}
EOF
nmap -builtin ,t :trans<CR>
2014-07-13 11:29:14 +00:00
" vim: set ft=pentadactyl: