Changeset 9404
- Timestamp:
- 04/13/08 20:20:52 (6 months ago)
- Files:
-
- 1 modified
-
lang/javascript/vimperator-plugins/trunk/copy.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/copy.js
r8695 r9404 1 1 /** 2 * vimperator plugin 3 * Add `copy' command 4 * For vimperator 0.6pre 5 * @author teramako teramako@gmail.com 6 * @version 0.2 2 * ==VimperatorPlugin== 3 * @name copy.js 4 * @description enable to copy strings from a template (like CopyURL+) 5 * @description-ja テンプレートから文字列のコピーを可能にします(CopyURL+みたなもの) 6 * @minVersion 0.6pre 7 * @author teramako teramako@gmail.com 8 * @version 0.3 9 * ==/VimperatorPlugin== 7 10 * 8 11 * Usage: … … 13 16 * :copy %TITLE% -> copied the title of the current page 14 17 * :copy title -> same as `:copy %TITLE%' by default 15 * :copy! liberator.version -> copy the value of liberator.version18 * :copy! liberator.version -> copy the value of liberator.version 16 19 * 17 20 * If non-argument, used `default' … … 32 35 * %SEL% -> to the string of selection 33 36 * %HTMLSEL% -> to the html string of selection 37 * 38 * The copy_templates is a string variable which can set on 39 * vimperatorrc as following. 40 * 41 * let copy_templates = "[ {label:'titleAndURL', value:'%TITLE%\n%URL%'}, {label:'title', value:'%TITLE%'} ]" 42 * 43 * or your can set it using inline JavaScript. 44 * 45 * javascript <<EOM 46 * liberator.globalVariables.copy_templates = uneval([ 47 * { label: 'titleAndURL', value: '%TITLE%\n%URL%' }, 48 * { label: 'title', value: '%TITLE%' }, 49 * { label: 'anchor', value: '<a href="%URL%">%TITLE%</a>' }, 50 * { label: 'selanchor', value: '<a href="%URL%" title="%TITLE%">%SEL%</a>' }, 51 * { label: 'htmlblockquote', value: '<blockquote cite="%URL%" title="%TITLE%">%HTMLSEL%</blockquote>' }, 52 * ]); 53 * EOM 34 54 */ 35 const templates = [55 const templates = window.eval(liberator.globalVariables.copy_templates) || [ 36 56 { label: 'titleAndURL', value: '%TITLE%\n%URL%' }, 37 57 { label: 'title', value: '%TITLE%' },
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)