aboutsummaryrefslogtreecommitdiffstats
path: root/twittperator
diff options
context:
space:
mode:
authoranekos2013-01-20 00:26:40 +0900
committeranekos2013-01-20 00:26:40 +0900
commitddc08a2970b54778b6a64c3b7cd8a5e6f749a9fd (patch)
tree23815a766bf465d9ab5d25d1d8d3b09240fc4ebb /twittperator
parent5f9f8b699331135b9cd54c95bcb5595bfd1fc650 (diff)
downloadvimperator-plugins-ddc08a2970b54778b6a64c3b7cd8a5e6f749a9fd.tar.bz2
tweetTimeVisible は削除 :style コマンドで設定する仕様に。
例: :style -name tw-sidebar-hidden-time chrome://* .tw-anekos-sb-plugin-item-time { display: none }
Diffstat (limited to 'twittperator')
-rw-r--r--twittperator/twsidebar.tw12
-rw-r--r--twittperator/twsidebar/chrome/content/twsidebar.css9
2 files changed, 11 insertions, 10 deletions
diff --git a/twittperator/twsidebar.tw b/twittperator/twsidebar.tw
index 8a7187e..f005760 100644
--- a/twittperator/twsidebar.tw
+++ b/twittperator/twsidebar.tw
@@ -56,9 +56,6 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () {
// サイドバーが閉じていても、こっそり開始しておく
silentStart: false,
- // 時間とかRTした人のIDとかの表示
- tweetTimeVisible: false,
-
// 配列かオブジェクトを返すと、変更できる。
// 文字列 "reject" を返すと、そもそもツイートが表示されなくなる。
modifier: function (msg, tab, streamName) {
@@ -146,11 +143,10 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () {
<vbox flex="1">
<hbox flex="1">
<label class={nameClass}>{escapeBreakers(t.name)}</label>
- <spacer flex="1"/>
- {(Config.tweetTimeVisible && t.sub) ? t.sub : ''}
</hbox>
<description flex="1" class={className('item-text')}>{escapeBreakers(t.text)}</description>
- <description flex="1" class={className('item-sub')}>{escapeBreakers(t.sub || '')}</description>
+ <description flex="1" class={className('item-sub')} hidden={!t.sub}>{escapeBreakers(t.sub || '')}</description>
+ <description flex="1" class={className('item-time')} hidden={!t.time}>{escapeBreakers(t.time || '')}</description>
</vbox>
</hbox>
</richlistitem>;
@@ -397,8 +393,8 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () {
t.text += ' [\u5730\u57DF: ' + msg.user.location + ']';
}
- if (!t.sub && msg.created_at) {
- t.sub = new Date(msg.created_at).toLocaleTimeString().replace(/:\d+$/,'');;
+ if (msg.created_at) {
+ t.time = new Date(msg.created_at).toLocaleTimeString().replace(/:\d+$/,'');;
}
if (real && dummy) {
diff --git a/twittperator/twsidebar/chrome/content/twsidebar.css b/twittperator/twsidebar/chrome/content/twsidebar.css
index 72755a4..3801f99 100644
--- a/twittperator/twsidebar/chrome/content/twsidebar.css
+++ b/twittperator/twsidebar/chrome/content/twsidebar.css
@@ -57,11 +57,16 @@
font-weight: bold;
}
+.tw-anekos-sb-plugin-item-text {
+ word-break: break-all;
+}
+
.tw-anekos-sb-plugin-item-sub {
+ background-color: pink;
font-size: 80%;
}
-.tw-anekos-sb-plugin-item-text {
- word-break: break-all;
+.tw-anekos-sb-plugin-item-time {
+ font-size: 80%;
}