Use content object in copy.js templates.
2 set titlestring=Firefox
7 set visualbellstyle=display:none;
11 map <C-9> :tablast<CR>
12 map ,R :source ~/.vimperatorrc
14 inoremap <C-v> <C-v><C-v>
16 cnoremap <C-v> <C-v><C-v>
23 var feedPanel = document.createElement('statusbarpanel');
24 var feedButton = document.getElementById('feed-button');
25 feedPanel.setAttribute('id','feed-panel-clone');
26 feedPanel.appendChild(feedButton.cloneNode(true));
27 feedButton.parentNode.removeChild(feedButton);
28 document.getElementById('status-bar').insertBefore(feedPanel,document.getElementById('security-button'));
33 " plugin/ime_controller.js
34 let g:ex_ime_mode = "inactive"
35 let g:textarea_ime_mode = "inactive"
41 function get_tus(w, d) {
42 var t = content.document.title;
43 var u = content.location.href;
44 var s = content.window.getSelection().getRangeAt(0).toString();
47 liberator.globalVariables.copy_templates = [
48 { label: 't', value: '%TITLE%' },
49 { label: 'tu', value: '%TITLE% - %URL%' },
50 { label: 'asin', custom: function(){
51 return content.document.getElementById('ASIN').value;
53 { label: 'wiki', custom: function() {
54 var [t, u, s] = get_tus(window, document);
55 s = s.replace(/\n/, "\n> ");
56 return t + "\n- " + u + (s? ("\n> " + s): '');
58 { label: 'my', custom: function() {
59 var [t, u, s] = get_tus(window, document);
60 s = s.replace(/\n/, "\n ");
61 return t + ":\n - " + u + (s? ("\n >>\n " + s + "\n <<"): '');
63 { label: 'datestr', custom: function() {
64 return '[' + content.location.href.match(/\d\d\d\d-\d\d-\d\d-\d+/) + ']';
70 " plugin/feedSomeKeys.js
71 autocmd LocationChange .* :fmapc
73 autocommands.add('LocationChange',/reader\.livedoor\.com\/reader\//,
74 'js plugins.feedKey.setup("j k s a p v c <Space> <S-Space> z Z < > q w b i".split(/ +/));');
75 autocommands.add('LocationChange',/mail\.google\.com\/mail\//,
76 'js plugins.feedKey.setup("j k p n e u o / <C-c>".split(/ +/));');
79 echo ".vimperatorrc loaded."