diff options
author | trapezoid | 2008-04-05 10:09:29 +0000 |
---|---|---|
committer | trapezoid | 2008-04-05 10:09:29 +0000 |
commit | b462c3042bc2f8d5ce523e2529d07fb21d123aec (patch) | |
tree | 09f6c0e819bb982708e729d5fc8e9828f45498aa /xpathBlink.js | |
parent | 4d07ae198b80ddf667212c763972ee8335e9219e (diff) | |
download | vimperator-plugins-b462c3042bc2f8d5ce523e2529d07fb21d123aec.tar.bz2 |
lang/javascript/vimperator-plugins/trunk/xpathBlink.js: 0.6pre対応
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@8920 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'xpathBlink.js')
-rw-r--r-- | xpathBlink.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/xpathBlink.js b/xpathBlink.js index a55c997..d2fa544 100644 --- a/xpathBlink.js +++ b/xpathBlink.js @@ -1,6 +1,12 @@ /** - * For vimperator 0.5.3 + * For vimperator 0.6pre * @author teramako teramako@gmail.com + * + * Usage: + * + * xpath blink nodes + * :xpathb[link] [EXPRESSION] + * :xb [EXPERSSION] */ (function(){ const Cc = Components.classes; @@ -33,27 +39,23 @@ function blink(aNode){ setTimeout(setOutline, i * 100); } } -vimperator.commands.add(new vimperator.Command(['xpathb[link]','xb'], +liberator.commands.addUserCommand(['xpathb[link]','xb'],'XPath blink nodes'. function(expression){ var result try { - result = vimperator.buffer.evaluateXPath(expression); + result = liberator.buffer.evaluateXPath(expression); } catch(e) { - vimperator.echoerr('XPath blink: ' + e); + liberator.echoerr('XPath blink: ' + e); } if (!result.snapshotLength){ - vimperator.echo('XPath blink: none'); + liberator.echo('XPath blink: none'); return; } for (var i=0; i<result.snapshotLength; i++){ blink(result.snapshotItem(i)); } - },{ - usage: ['xpathb[link] [EXPRESSION]','xb [EXPERSSION]'], - shortHelp: 'XPath blink nodes', - help: 'Search nodes with XPath [EXPRESSION] and blink the nodes' - } -)); + },{} +); })(); // vim: set fdm=marker sw=4 ts=4 et: |