From 95b4d91aa82719cfce0f314cd6f1a605530d54a8 Mon Sep 17 00:00:00 2001 From: mattn Date: Wed, 22 Oct 2008 02:07:26 +0000 Subject: follow latest vimperator. git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@21813 d0d07461-0603-4401-acd4-de1884942a52 --- mixiecho.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mixiecho.js') diff --git a/mixiecho.js b/mixiecho.js index aa40b26..c3dbb39 100644 --- a/mixiecho.js +++ b/mixiecho.js @@ -1,5 +1,5 @@ // Vimperator plugin: "Update mixi echo" -// Last Change: 08-Oct-2008. Jan 2008 +// Last Change: 21-Oct-2008. Jan 2008 // License: Creative Commons // Maintainer: mattn - http://mattn.kaoriya.net/ @@ -58,7 +58,7 @@ xhr.send(null); var nodes = getElementsByXPath('id("echo")//div[@class="archiveList"]//tr', parseHTML(xhr.responseText, ['script'])); var statuses = []; - nodes.forEach(function(node) { + if (nodes && nodes.length) nodes.forEach(function(node) { var img = getFirstElementByXPath('.//img', node).src; var name = getFirstElementByXPath('.//*[@class="nickname"]', node).textContent.replace(/(?:\r?\n|\r)[ \t]*/g, ""); var c = getFirstElementByXPath('.//*[@class="comment"]', node).childNodes; @@ -110,8 +110,9 @@ xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.send(params.join('&')); } - liberator.commands.addUserCommand(["mixiecho"], "Change mixi echo", + commands.addUserCommand(["mixiecho"], "Change mixi echo", function(arg, special){ + arg = arg.string; if (special || arg.length == 0) showFollowersStatus() else -- cgit v1.2.3