Changeset 22787 for dotfiles

Show
Ignore:
Timestamp:
11/05/08 23:10:34 (5 years ago)
Author:
pekepeke
Message:
 
Location:
dotfiles/vimperator
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • dotfiles/vimperator/pekepeke-vimperatorrc

    r22493 r22787  
    155155noremap ,0 :set go=<CR>:set stal=0<CR> 
    156156 
     157"" localkeymode.js 
     158let g:localkeymode_enable = "true" 
     159map ,j :loadkeymaps<Space> 
     160 
    157161"" sbmcommentsviewer.js 
    158162let g:def_sbm_format = "timestamp,id,tagsAndComment" 
     
    170174let g:ldrc_captureMappings = "[ 'j', 'k', 'p', 'o', '?']" 
    171175let g:ldrc_hints = "false" 
    172 let g:ldrc_intelligence_bind = "true" 
     176let g:ldrc_intelligence_bind = "false" 
    173177let g:ldrc_skip = "0.2" 
    174178 
    175179"" livedoor Reader UnRead Count 
    176 "let livedoor_id = "" 
     180"let livedoor_id = "xxxxxxxx" 
    177181 
    178182"" asdfghjkl.js 
  • dotfiles/vimperator/pekepeke-vimperatorrc.css

    r22493 r22787  
    22/* bufferwindow style */ 
    33#liberator-container{ 
    4     color: #ffffff !important; // �w�肵�Ȃ���ufferwindow��olor�������Ȃ� 
     4    color: #ffffff !important; /* �w�肵�Ȃ���ufferwindow��olor�������Ȃ� */ 
    55} 
    66#liberator-bufferwindow, #liberator-completion, #liberator-previewwindow { 
  • dotfiles/vimperator/pekepeke-vimperatorrc.js

    r22493 r22787  
    66  'Copy selected text or ', 
    77  function () { 
    8         var sel = window.content.getSelection(); // buffer.getCurrentWord(); 
     8    var sel = window.content.getSelection(); // buffer.getCurrentWord(); 
    99    if (sel) { 
    1010      util.copyToClipboard(sel, true); 
     
    5858(function() { 
    5959  var setFavicon = function(){ 
    60     var p = document.getElementById('page-proxy-favicon-clone'); 
    61     var b = document.getElementById('page-proxy-favicon'); 
    62     if (!p) { 
    63       var p = document.createElement('statusbarpanel'); 
    64       p.setAttribute('id','page-proxy-favicon-clone'); 
    65       var n = b.cloneNode(false); 
    66       n.setAttribute('id','page-proxy-favicon-clone-ico'); 
    67       n.setAttribute('width',16); 
    68       n.setAttribute('height',16); 
    69       p.appendChild(n); 
    70       document.getElementById('status-bar').insertBefore(p,document.getElementById('liberator-statusline')); 
    71     } else if (p.childNodes.length > 0) { 
    72         p.childNodes.item(0).setAttribute('src', b.getAttribute('src')); 
    73     } 
     60  var p = document.getElementById('page-proxy-favicon-clone'); 
     61  var b = document.getElementById('page-proxy-favicon'); 
     62  if (!p) { 
     63    var p = document.createElement('statusbarpanel'); 
     64    p.setAttribute('id','page-proxy-favicon-clone'); 
     65    var n = b.cloneNode(false); 
     66    n.setAttribute('id','page-proxy-favicon-clone-ico'); 
     67    n.setAttribute('width',16); 
     68    n.setAttribute('height',16); 
     69    p.appendChild(n); 
     70    document.getElementById('status-bar').insertBefore(p,document.getElementById('liberator-statusline')); 
     71  } else if (p.childNodes.length > 0) { 
     72      p.childNodes.item(0).setAttribute('src', b.getAttribute('src')); 
     73  } 
    7474  } 
    7575  getBrowser().addEventListener("load", function() setFavicon() , true); 
     
    7979// statusline の [+-] をわかりやすい位置にわかりやすく表示 
    8080(function() { 
    81   var p = document.createElement('statusbarpanel'); 
    82   var l = document.getElementById('liberator-statusline-field-tabcount').cloneNode(false); 
    83   l.setAttribute('id', 'liberator-statusline-field-history'); 
    84   l.setAttribute('value', '  '); 
    85   p.appendChild(l); 
    86   document.getElementById('status-bar').insertBefore(p, document.getElementById('liberator-statusline')); 
    87   var setter = function() { 
    88     var e = document.getElementById('liberator-statusline-field-history'); 
    89     var h = getWebNavigation().sessionHistory; 
    90     h = (h.index > 0 ? "<" : " ") + (h.index < h.count - 1 ? ">" : " "); 
    91     e.setAttribute('value', h); 
    92   }; 
    93   setter(); 
    94   getBrowser().addEventListener("load", function() setter(), true); 
    95   getBrowser().addEventListener("TabSelect", function() setter(), true); 
     81  if (document.getElementById('liberator-statusline-field-history') == null){ 
     82    var p = document.createElement('statusbarpanel'); 
     83    var l = document.getElementById('liberator-statusline-field-tabcount').cloneNode(false); 
     84    l.setAttribute('id', 'liberator-statusline-field-history'); 
     85    l.setAttribute('value', '  '); 
     86    p.appendChild(l); 
     87    document.getElementById('status-bar').insertBefore(p, document.getElementById('liberator-statusline')); 
     88    var setter = function() { 
     89      var e = document.getElementById('liberator-statusline-field-history'); 
     90      var h = getWebNavigation().sessionHistory; 
     91      h = (h.index > 0 ? "<" : " ") + (h.index < h.count - 1 ? ">" : " "); 
     92      e.setAttribute('value', h); 
     93    }; 
     94    setter(); 
     95    getBrowser().addEventListener("load", function() setter(), true); 
     96    getBrowser().addEventListener("TabSelect", function() setter(), true); 
     97  } 
    9698})(); 
    9799 
     
    101103// for Livedoor Reader Subscribe 
    102104commands.addUserCommand(["subscribeldr","sldr"], "post to livedoor reader",  
    103   function (arg){ liberator.open("http://reader.livedoor.com/subscribe/"+buffer.URL);} 
     105  function (){ liberator.open("http://reader.livedoor.com/subscribe/"+escape(buffer.URL));} 
     106); 
     107 
     108commands.addUserCommand(["gyotaku"], "create web gyotaku",  
     109  function (){ liberator.open("http://megalodon.jp/?url="+escape(buffer.URL));} 
    104110); 
    105111 
    106112// open vimp nightly page 
    107113commands.addUserCommand(["vimpupd[ate]"], "open vimperator nightly xpi page", 
    108   function (arg){ liberator.open('http://vimperator.driftaway.org/', liberator.NEW_TAB); } 
    109 ); 
    110  
     114  function (){ liberator.open('http://vimperator.driftaway.org/', liberator.NEW_TAB); } 
     115); 
    111116commands.addUserCommand(["vimptrac","vimplab"], "open vimperator trac page", 
    112   function (arg){ liberator.open('http://vimperator.org/trac/', liberator.NEW_TAB); } 
     117  function (){ liberator.open('http://vimperator.org/trac/', liberator.NEW_TAB); } 
     118); 
     119commands.addUserCommand(["vimpscr[ipt]"], "open vimperator trac script page", 
     120  function (){ liberator.open('http://vimperator.org/trac/wiki/Vimperator/Scripts', liberator.NEW_TAB); } 
     121); 
     122commands.addUserCommand(["coderepos"], "open coderepos web site", 
     123  function (){ liberator.open('http://coderepos.org/share/browser/lang/javascript/vimperator-plugins/trunk/', liberator.NEW_TAB); } 
    113124); 
    114125 
     
    130141}); 
    131142 
     143commands.addUserCommand( ["yankall[tabs]"], 'yank url and title', 
     144function(){ 
     145  var tabs = getBrowser().mTabs; 
     146  var m=''; 
     147  for (var i=0, l=tabs.length; i<l; i++){ 
     148    m+=tabs[i].linkedBrowser.contentDocument.title + ':' + 
     149      tabs[i].linkedBrowser.contentDocument.location.href + '\n'; 
     150  } 
     151  util.copyToClipboard(m); 
     152}); 
     153 
     154// *************************************************************** 
     155// * for userChrome.js 
     156// *************************************************************** 
     157(function() { 
     158  ['userchrome'].forEach( function(dirs){ 
     159    var dir = io.getRuntimeDirectories(dirs)[0]; 
     160    io.readDirectory(dir).forEach(function(file) { 
     161      if (/\.(js|css)$/i.test(file.path)) io.source(file.path, false); 
     162    }); 
     163  }); 
     164})(); 
     165 
    132166// *************************************************************** 
    133167// * for plugin 
    134168// *************************************************************** 
    135 // autocommand で関数を使う -- http://d.hatena.ne.jp/nokturnalmortum/20080808#1218185221 
    136 let(liexe = liberator.execute) { 
    137   liberator.execute = function (func, modifiers) { 
    138   if (func instanceof Function) { 
    139     return func(); 
    140   } 
    141   liexe.apply(liberator, arguments); 
    142   }; 
    143 } 
    144  
    145169// copy.js 
    146170liberator.globalVariables.copy_templates = [ 
     
    165189    } ] 
    166190  }, { 
    167     conf_name: 'forwarding', 
     191    conf_name: 'localhost:8080', 
    168192    conf_usage: 'use port forwarding', 
    169193    settings: [ { 
     
    186210    ['m', ':nicomute'], 
    187211    ['v', ':nicommentvisible'], 
    188     ['s', ':nicoseek! +5'], 
    189     ['S', ':nicoseek! -5'], 
    190 //    ['l', ':nicovolume! +5'], 
    191 //    ['L', ':nicovolume! -5'], 
    192212    ['z', ':nicosize '], 
    193213    ['c', ':nicomment '], 
     
    205225  ]], 
    206226  [ /www\.nicovideo\.jp/, [ 
    207     ['A', ':nnppushallvideos'], 
    208     ['d', ':nnpclear'], 
    209     ['g', ':nnpgetlist '], 
    210     ['o', ':nnpplaynext '], 
    211     ['a', ':nnppushthisvideo'], 
     227    ['nA', ':nnppushallvideos'], 
     228    ['nc', ':nnpclear'], 
     229    ['ng', ':nnpgetlist '], 
     230    ['no', ':nnpplaynext '], 
     231    ['np', ':nnppushthisvideo'], 
    212232  ]], 
    213233  [ /www\.youtube\.com/, [ 
     
    216236    ['s', ':ytseek! +5'], 
    217237    ['S', ':ytseek! -5'], 
    218 //    ['l', ':ytvolume! +5'], 
    219 //    ['l', ':ytvolume! -5'], 
    220238    ['p', ':ytpause'], 
    221239    ['m', ':ytmute'], 
     
    230248    ['<Space>', ':ytpause'], 
    231249  ]], 
    232   [ /.+/, [ 
    233     ['j', '<Down><Down><Down><Down><Down>'], 
    234     ['k', '<Up><Up><Up><Up><Up>'], 
    235     ['?', '<C-v>?'], 
     250  [ "jk-scroll", [ 
     251    ['j', '<C-d>'], 
     252    ['k', '<C-u>'], 
    236253  ]], 
    237254//  ['', [