From b462c3042bc2f8d5ce523e2529d07fb21d123aec Mon Sep 17 00:00:00 2001 From: trapezoid Date: Sat, 5 Apr 2008 10:09:29 +0000 Subject: 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 --- xpathBlink.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'xpathBlink.js') 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