From 2ca6931857620ee894f002573af4dc7231b4a61b Mon Sep 17 00:00:00 2001
From: teramako
Date: Sat, 4 Oct 2008 13:06:02 +0000
Subject: はてなスターの表示
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@20707 d0d07461-0603-4401-acd4-de1884942a52
---
haiku.js | 2 ++
1 file changed, 2 insertions(+)
(limited to 'haiku.js')
diff --git a/haiku.js b/haiku.js
index 8f8f945..d945e33 100644
--- a/haiku.js
+++ b/haiku.js
@@ -128,6 +128,7 @@
statuses.map(function(status) {
var text = status.text;
var keyword = status.keyword;
+ var star = status.favorited > 0 ? 'x' + status.favorited + '' : '';
if (text.indexOf(keyword+"=") == 0) text = status.text.substr(keyword.length + 1);
text = convert(text);
keyword = convert(keyword);
@@ -139,6 +140,7 @@
{status.user.name}
>.toSource()
.replace(/(?:\r?\n|\r)[ \t]*/g, " ") +
+ star +
sprintf(': %s
%s