aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormattn2008-10-22 02:07:26 +0000
committermattn2008-10-22 02:07:26 +0000
commit95b4d91aa82719cfce0f314cd6f1a605530d54a8 (patch)
tree6bfcb45904b285dd5447c4aeb0fb5a40f6213aef
parent22bde63d6337b1bb97784253baeb7b5ceed7ca3d (diff)
downloadvimperator-plugins-95b4d91aa82719cfce0f314cd6f1a605530d54a8.tar.bz2
follow latest vimperator.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@21813 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r--mixiecho.js7
1 files changed, 4 insertions, 3 deletions
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 <mattn.jp@gmail.com> - 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