diff options
author | mattn | 2008-11-11 04:08:09 +0000 |
---|---|---|
committer | mattn | 2008-11-11 04:08:09 +0000 |
commit | 843cf3a2d77909513d967aa4ca3b94c446e42faa (patch) | |
tree | 2d24c10779a011ab4f274bcad08af5f74faffc1d /wassr.js | |
parent | 357a941e87c6a6525edf04a607537f3eebec146e (diff) | |
download | vimperator-plugins-843cf3a2d77909513d967aa4ca3b94c446e42faa.tar.bz2 |
status.textに&があるとテキスト展開されていたのを修正
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@23217 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'wassr.js')
-rw-r--r-- | wassr.js | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,5 +1,5 @@ // Vimperator plugin: "Update Wassr"
-// Last Change: 22-Oct-2008. Jan 2008
+// Last Change: 11-Nov-2008. Jan 2008
// License: Creative Commons
// Maintainer: mattn <mattn.jp@gmail.com> - http://mattn.kaoriya.net/
// Based On: twitter.js by Trapezoid
@@ -68,6 +68,7 @@ var endPoint = target ? "http://api.wassr.jp/user_timeline.json?id=" + target
: "http://api.wassr.jp/statuses/friends_timeline.json?id=" + username;
xhr.open("GET", endPoint, false, username, password);
+ xhr.setRequestHeader("User-Agent", "XMLHttpRequest");
// for debug
//xhr.open("GET", "http://api.wassr.jp/statuses/user_timeline/otsune.json", false, username, password);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
@@ -76,7 +77,7 @@ var html = <style type="text/css"><![CDATA[
span.wassr.entry-content a { text-decoration: none; }
- img.wassr.photo { border; 0px; width: 16px; height: 16px; vertical-align: baseline; }
+ img.wassr.photo { border; 0px; width: 16px; height: 16px; vertical-align: baseline; margin: 1px; }
]]></style>.toSource()
.replace(/(?:\r?\n|\r)[ \t]*/g, " ") +
statuses.map(function(status)
@@ -86,9 +87,9 @@ title={status.user.screen_name}
class="wassr photo"/>
<strong>{status.user_login_id}‬</strong>
+ : <span class="wassr entry-content">{emojiConv(status.text)}‬</span>
</>.toSource()
- .replace(/(?:\r?\n|\r)[ \t]*/g, " ") +
- sprintf(': <span class="wassr entry-content">%s‬</span>', emojiConv(status.text)))
+ .replace(/(?:\r?\n|\r)[ \t]*/g, " "))
.join("<br/>");
//liberator.log(html);
|