diff options
author | teramako | 2008-10-04 13:06:02 +0000 |
---|---|---|
committer | teramako | 2008-10-04 13:06:02 +0000 |
commit | 2ca6931857620ee894f002573af4dc7231b4a61b (patch) | |
tree | 3c351f4739cdaeb10fef07b225ab081e7699b440 | |
parent | 0db074fb37fee5d47613f011ccde2fbb635c81c6 (diff) | |
download | vimperator-plugins-2ca6931857620ee894f002573af4dc7231b4a61b.tar.bz2 |
はてなスターの表示
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@20707 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r-- | haiku.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -128,6 +128,7 @@ statuses.map(function(status) {
var text = status.text;
var keyword = status.keyword;
+ var star = status.favorited > 0 ? '<img src="http://s.hatena.ne.jp/images/star.gif"/><span style="color:orange;">x' + status.favorited + '</span>' : '';
if (text.indexOf(keyword+"=") == 0) text = status.text.substr(keyword.length + 1);
text = convert(text);
keyword = convert(keyword);
@@ -139,6 +140,7 @@ <strong>{status.user.name}‬</strong>
</>.toSource()
.replace(/(?:\r?\n|\r)[ \t]*/g, " ") +
+ star +
sprintf(': <span class="haiku entry-title">%s</span><br /><span class="haiku entry-content">%s‬</span><hr />',
keyword, text)
}).join("");
|