本帖最后由 lll9p 于 2012-4-23 12:44 编辑
贴上从这里偷的配置。
2012年4月重新改了下配置,再帖出来~~- "Pentadactyl hg6757 (created 2012/04/19 00:00:07) running on:
- "Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0
- "Configured by lll9p lll9p.china@gmail.com
- "created:2011/07/24 10:44:08 modified:2012/04/19/ 16:00:15
- loadplugins '\.(js|penta)
- group user
- "set设置{{{
- "界面设置,在tab上显示序号{
- set go+=n
- "}
- "dict.js插件设置{
- set dict-langpair=g:'|zh-CN',y:eng
- "}
- "Hint{
- "设置hint为字母模式
- "set hintkeys=asdfg;lkjh
- "中文hints
- :set hintmatching=custom
- "
- :set chinesehints=wubi
- "}
- "防止在最后一个tab的时候按d退出firefox{
- set! browser.tabs.closeWindowWithLastTab=false
- "}
- "tab显示方式{
- "set showtabline=multitab
- "}
- "高亮搜索{
- set hlfind
- "}
- "gmail 和 google reader键设置{
- set passkeys=www\.google\.com/reader/.*:Ajkov,ga,gF,gu
- set passkeys='mail\.google\.com/':c/kjnpouex!ra#[]zN?
- "}
- " ]]/[[转到上一页/下一页{
- "下一页
- set nextpattern^='\s*[下后][一]?[页张个篇章]\s*','››'
- "上一页
- set previouspattern^='\s*[上前][一]?[页张个篇章]\s*','‹‹'
- "}
- "}}}
- "设置map{{{
- "选中文字用t o打开google搜索,google的关键字设置为g{
- "设置google为默认引擎,否则以下设置工作不正常
- set defsearch=g
- map t -js content.getSelection().toString()!=""?dactyl.execute(":tabopen "+ content.getSelection()):CommandExMode().open("tabopen ")
- map o -js content.getSelection().toString()!=""?dactyl.execute(":open "+ content.getSelection()):CommandExMode().open("open ")
- "结合dict插件翻译选中字符串
- "map -a -ex s dict -e <arg>
- "dict.cn
- map s -js content.getSelection().toString()!=""?dactyl.execute(":dict -e d "+ content.getSelection()):""
- "google翻译
- map sa -js content.getSelection().toString()!=""?dactyl.execute(":dict -e g "+ content.getSelection()):""
- "qq
- map sq -js content.getSelection().toString()!=""?dactyl.execute(":dict -e q "+ content.getSelection()):""
- "有道
- map sw -js content.getSelection().toString()!=""?dactyl.execute(":dict -e y "+ content.getSelection()):""
- "汉典
- map sz -js content.getSelection().toString()!=""?dactyl.execute(":dict! -e z "+ content.getSelection()):""
- "}
- "加快移动{
- map -builtin j 5j
- map -builtin k 5k
- "}
- "标签移动加速{
- map K :tn<CR>
- map J :tp<CR>
- "}
- "F2来显示隐藏工具栏{
- map <F2> -e set go!=T
- "}
- "实现快速的重启,查看下载,查看扩展等{
- "set mapleader=','
- "noremap <leader>a :addons<cr>
- "noremap <leader>d :downloads<cr>
- "}
- "快速改变页面编码{
- map -builtin ,eu :set encoding=UTF-8
- map -builtin ,eg :set encoding=GB2312
- "}
- "搜索选中的字符串,并可选搜索引擎{
- command! -nargs=? -complete=search SearchSelect exe 't <args> ' + content.getSelection()
- map S :SearchSelect<Space>
- "}
- "}}}
- "自定义命令{{{
- "开启和关闭javascript或图片{
- command! noimg set! permissions.default.image=2
- command! nojs set! javascript.enabled=false
- command! ysimg set! permissions.default.image=1
- command! ysjs set! javascript.enabled=true
- "}
- "网站应用{
- "http://validator.w3.org{{{
- command! valid :open javascript:void(location='http://validator.w3.org/check?uri='+escape(location));
- "}}}
- "http://getfirebug.com/firebuglite{{{
- command! firebug :open javascript:(function(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+'NS']&&F.documentElement.namespaceURI;E=E?F[i+'NS'](E,'script'):F[i]('script');E[r]('id',b);E[r]('src',I+g+T);E[r](b,u);(F[e]('head')[0]||F[e]('body')[0]).appendChild(E);E=new%20Image;E[r]('src',I+L);})(document,'createElement','setAttribute','getElementsByTagName','FirebugLite','4','firebug-lite.js','releases/lite/latest/skin/xp/sprite.png','https://getfirebug.com/','#startOpened');
- "}}}
- "http://sr3d.github.com/GithubFinder/{{{
- command! bml-ghfinder -description "Bookmarklet: Open any Github repo in GHFinder" open javascript:%20(function%20()%20{%20var%20a%20=%20(new%20RegExp("github.com/(.+)",%20"i")).exec(window.location.href);%20var%20f%20=%20a%20?%20a[1].split("/")%20:%20[];%20var%20b%20=%20f[0];%20var%20d%20=%20f[1];%20var%20e%20=%20f[3];%20var%20c%20=%20"http://sr3d.github.com/GithubFinder/?utm_source=bml"%20+%20(a%20?%20"&user_id="%20+%20b%20+%20"&repo="%20+%20d%20+%20(e%20?%20"&branch="%20+%20e%20:%20"")%20:%20"");%20if%20(!c)%20{%20alert("Invalid%20Github%20URL");%20return%20}%20window.open(c)%20})();
- "}}}
- "http://www.instapaper.com/u{{{
- command! bml-instapaper -description "Bookmarklet: A simple tool to save web pages for reading later" open javascript:function%20iprl5(){var%20d=document,z=d.createElement('scr'+'ipt'),b=d.body,l=d.location;try{if(!b)throw(0);d.title='(Saving...)%20'+d.title;z.setAttribute('src',l.protocol+'//www.instapaper.com/j/bQ1lnqqYCoKr?u='+encodeURIComponent(l.href)+'&t='+(new%20Date().getTime()));b.appendChild(z);}catch(e){alert('Please%20wait%20until%20the%20page%20has%20loaded.');}}iprl5();void(0);
- "}}}
- "http://page2rss.com/{{{
- command! bml-page2rss -description "Bookmarklet: Turn any page to RSS" open javascript:(function(){if(!window.page2rss_bookmark_urlr)window.page2rss_bookmark_urlr=function(ur){if(ur.error)alert(ur.error);if(ur.page&&ur.page.page)location.href=ur.page.page};var%20r=document.getElementById('urlFormRequest');if(r)r.parentNode.removeChild(r);r=document.createElement('script');r.id='urlFormRequest';r.type='text/javascript';r.src='http://page2rss.com/api/page?url='+encodeURIComponent(location.href)+'&callback=page2rss_bookmark_urlr';document.body.appendChild(r);})();
- "}}}
- "http://www.readability.com/bookmarklets{{{
- command! bml-readability -description "Bookmarklet: Make webpage readable using readability" open javascript:%20((function%20()%20{%20window.baseUrl%20=%20'http://www.readability.com';%20window.readabilityToken%20=%20'';%20var%20s%20=%20document.createElement('script');%20s.setAttribute('type',%20'text/javascript');%20s.setAttribute('charset',%20'UTF-8');%20s.setAttribute('src',%20baseUrl%20+%20'/bookmarklet/read.js');%20document.documentElement.appendChild(s);%20})());
- "}}}
- "http://readable.tastefulwords.com/{{{
- command! bml-readable -description "Bookmarklet: Make webpage readable" open javascript:(function(){_readableOptions={'text_font':'quote(Palatino%20Linotype),%20Palatino,%20quote(Book%20Antigua),%20Georgia,%20serif','text_font_monospace':'quote(Courier%20New),%20Courier,%20monospace','text_font_header':'quote(Times%20New%20Roman),%20Times,%20serif','text_size':'18px','text_line_height':'1.5','box_width':'30em','color_text':'#282828','color_background':'#F5F5F5','color_links':'#0000FF','text_align':'normal','base':'blueprint','custom_css':''};if(document.getElementsByTagName('body').length>0);else{return;}if(window.$readable){if(window.$readable.bookmarkletTimer){return;}}else{window.$readable={};}window.$readable.bookmarkletTimer=true;window.$readable.options=_readableOptions;if(window.$readable.bookmarkletClicked){window.$readable.bookmarkletClicked();return;}_readableScript=document.createElement('script');_readableScript.setAttribute('src','http://readable-static.tastefulwords.com/target.js?rand='+encodeURIComponent(Math.random()));document.getElementsByTagName('body')[0].appendChild(_readableScript);})();
- "}}}
- "http://readitlaterlist.com/add.php{{{
- command! bml-readitlater -description "Bookmarklet: A simple tool to save web pages for reading later" open javascript:%20(function%20()%20{%20ISRIL_H%20=%20'5979';%20ISRIL_SCRIPT%20=%20document.createElement('SCRIPT');%20ISRIL_SCRIPT.type%20=%20'text/javascript';%20ISRIL_SCRIPT.src%20=%20'http://readitlaterlist.com/b/r.js';%20document.getElementsByTagName('head')[0].appendChild(ISRIL_SCRIPT)%20})();
- "}}}
- "http://www.pdfdownload.org/pdf_bookmarklet.html{{{
- command! bml-savepage -description "Bookmarklet: Convert web pages into PDF files" open javascript:void(window.open(%27http://www.web2pdfconvert.com/convert.aspx?cURL=%27+escape(location.href)));
- command! bml-shareit -description "Bookmarklet: Universal sharing" open javascript:void((function(svc)%20{var%20d=document,w=window,p=0,b=function(){if(!p){p=1;if(_atc.xol)_adr.onReady();if(w.addthis_sendto)addthis_sendto(svc||%27bkmore%27,{product:%27bmt-%27+_atc.ver})}else{p=0;if(_atw)_atw.clb()}};if(!w._atc){var%20ol=w.addthis_onload||[],o=d.createElement(%27script%27);w.addthis_product%20=%20%27bmt-250%27;o.src=%27//s7.addthis.com/js/250/addthis_widget.js#domready=1&username=bookmarklet%27;ol.push(b);w.addthis_onload=ol;d.getElementsByTagName(%27body%27)[0].appendChild(o)}else%20b()})());
- command! bml-subscribe -description "Bookmarklet: Subscribe using Google reader" open javascript:var%20b=document.body;var%20GR________bookmarklet_domain='http://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/subscribe-bookmarklet.js');void(b.appendChild(z));}else{location='http://www.google.com/reader/view/feed/'+encodeURIComponent(location.href)};
- "}}}
- "http://labs.microsofttranslator.com/bookmarklet/{{{
- command! bml-translate -description "Bookmarklet: Translate any page with the simple click" open javascript:(function(){var%20s%20=%20document.createElement('script');%20s.type%20=%20'text/javascript';%20s.src%20=%20'http://labs.microsofttranslator.com/bookmarklet/default.aspx?f=js&to=en';%20document.body.insertBefore(s,%20document.body.firstChild);})();
- "}}}
- "https://dev.twitter.com/docs/share-bookmarklet{{{
- command! bml-twitter -description "Bookmarklet: Share on Twitter" open javascript:(function(){window.twttr=window.twttr||{};var%20D=550,A=450,C=screen.height,B=screen.width,H=Math.round((B/2)-(D/2)),G=0,F=document,E;if(C>A){G=Math.round((C/2)-(A/2))}window.twttr.shareWin=window.open('http://twitter.com/share','','left='+H+',top='+G+',width='+D+',height='+A+',personalbar=0,toolbar=0,scrollbars=1,resizable=1');E=F.createElement('script');E.src='http://platform.twitter.com/bookmarklets/share.js?v=1';F.getElementsByTagName('head')[0].appendChild(E)}());
- "}}}
- "http://chengyinliu.com/whatfont.html{{{
- command! bml-whatfont -description "Bookmarklet: Find out the fonts used in a webpage" open javascript:(function(){var%20d=document,s=d.createElement('scr'+'ipt'),b=d.body,l=d.location;s.setAttribute('src','http://chengyinliu.com/wf.js?o='+encodeURIComponent(l.href)+'&t='+(new%20Date().getTime()));b.appendChild(s)})();
- "}}}
- "}
- "}}}
- "风格设置{{{
- "命令行模式禁用输入法{
- style -name commandline-ime http://*,https://* input,textarea {ime-mode: active;}
- style -name commandline-ime chrome://* #dactyl-commandline-command input , #dactyl-statusline-field-commandline-command input {ime-mode: inactive;}
- "cmap <A-i> -js styles.user.get("cmd-ime").enabled ^= true; dactyl.focusedElement.blur();
-
- "}
- "显示dict查询状态{
- style chrome://browser/content/browser.xul statuspanel#statusbar-display { display:block; visibility: visible }
- "}
- "加大hint的字号{
- hi Hint font:bold 15px "Droid Sans Mono", monospace !important; margin:-.2ex; padding: 0 0 0 1px; outline:1px solid rgba(0, 0, 0, .5); background:rgba(255, 248, 231, .8); color:black; text-transform:uppercase;
- "}
- "}
- " Qmarks快速书签设置{
- silent qmark r http://www.renren.com/home#nogo
- silent qmark p https://plus.google.com
- silent qmark t https://twitter.com
- silent qmark f https://facebook.com
- silent qmark d http://www.douban.com
- " }}}
- " vim: set ft=vim:
复制代码 |