From 521c8efefd11bc53e5767d18731565e65a0a1af2 Mon Sep 17 00:00:00 2001 From: mattn Date: Wed, 22 Oct 2008 02:08:38 +0000 Subject: follow latest vimperator. git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@21814 d0d07461-0603-4401-acd4-de1884942a52 --- twitter.js | 8 ++++---- wassr.js | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/twitter.js b/twitter.js index ad76695..41a6f3b 100644 --- a/twitter.js +++ b/twitter.js @@ -1,5 +1,5 @@ // Vimperator plugin: "Update Twitter" -// Last Change: 08-Oct-2008. Jan 2008 +// Last Change: 20-Oct-2008. Jan 2008 // License: Creative Commons // Maintainer: Trapezoid - http://unsigned.g.hatena.ne.jp/Trapezoid // @@ -137,7 +137,7 @@ .replace(/(?:\r?\n|\r)[ \t]*/g, " "); liberator.echo(html, true); } - liberator.commands.addUserCommand(["twitter"], "Change Twitter status", + liberator.modules.commands.addUserCommand(["twitter"], "Change Twitter status", function(arg, special){ var password; var username; @@ -152,8 +152,8 @@ liberator.echoerr(ex); } - arg = arg.replace(/%URL%/g, liberator.buffer.URL) - .replace(/%TITLE%/g, liberator.buffer.title); + arg = arg.string.replace(/%URL%/g, liberator.modules.buffer.URL) + .replace(/%TITLE%/g, liberator.modules.buffer.title); if (special && arg.match(/^\?\s*(.*)/)) showTwitterSearchResult(RegExp.$1) diff --git a/wassr.js b/wassr.js index 5cb5b99..538f62d 100644 --- a/wassr.js +++ b/wassr.js @@ -1,5 +1,5 @@ // Vimperator plugin: "Update Wassr" -// Last Change: 29-Aug-2008. Jan 2008 +// Last Change: 20-Oct-2008. Jan 2008 // License: Creative Commons // Maintainer: mattn - http://mattn.kaoriya.net/ // Based On: twitter.js by Trapezoid @@ -91,6 +91,7 @@ sprintf(': %s‬', emojiConv(status.text))) .join("
"); + //liberator.log(html); liberator.echo(html, true); } function favWassr(username, password, user){ @@ -256,7 +257,7 @@ liberator.echo(html, true); } - liberator.commands.addUserCommand(["wassr"], "Change wassr status", + liberator.modules.commands.addUserCommand(["wassr"], "Change wassr status", function(arg, special){ var password; var username; @@ -271,8 +272,8 @@ liberator.echoerr(ex); } - arg = arg.replace(/%URL%/g, liberator.buffer.URL) - .replace(/%TITLE%/g, liberator.buffer.title); + arg = arg.string.replace(/%URL%/g, liberator.modules.buffer.URL) + .replace(/%TITLE%/g, liberator.modules.buffer.title); if (special && arg.match(/^\?\s*(.*)/)) showWassrSearchResult(RegExp.$1) @@ -299,7 +300,7 @@ }, { args: [ - [['-todo'], commands.OPTION_STRING], + [['-todo'], liberator.modules.commands.OPTION_STRING], [['-footmark'], null] ], bang: true, -- cgit v1.2.3