aboutsummaryrefslogtreecommitdiffstats
path: root/twittperator
diff options
context:
space:
mode:
authoranekos2013-04-06 18:22:02 +0900
committeranekos2013-04-06 18:22:02 +0900
commit37f3071e579fbe36deaf17c2513a6619707eab45 (patch)
tree90b6134fff349ec45ebaf48b4a25e5b31c92fba8 /twittperator
parent862198772d1b50822d888bae4d13d3ee8aa69740 (diff)
parent443904bbc0d49e6da3c80319e063e0c8bb258c4c (diff)
downloadvimperator-plugins-37f3071e579fbe36deaf17c2513a6619707eab45.tar.bz2
Merge branch 'master' into 3.6
for master updates Conflicts: lo.js twittperator.js
Diffstat (limited to 'twittperator')
-rw-r--r--twittperator/twsidebar.tw24
-rw-r--r--twittperator/twsidebar/chrome/content/twsidebar.css23
2 files changed, 37 insertions, 10 deletions
diff --git a/twittperator/twsidebar.tw b/twittperator/twsidebar.tw
index f0c0cba..ee8ba3b 100644
--- a/twittperator/twsidebar.tw
+++ b/twittperator/twsidebar.tw
@@ -126,7 +126,7 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () {
let xml;
let sbWidth = getSidebarWindow().document.width;
let richlistitemClasses = [className('tweet-panel'), className('tweet-' + t.type)];
- let nameClass = t.protected ? className('tweet-protected') : '';
+ let nameClass = className('item-name') + ' ' + (t.protected ? className('tweet-protected') : '');
xml =
<richlistitem
id={t.id}
@@ -136,17 +136,21 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () {
"width: " + px(sbWidth - 100) + ' !important'
].join(';')}
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <hbox>
- <vbox>
+ <hbox flex="1">
+ <vbox width="48">
<image src={t.img} height="48" width="48" />
</vbox>
- <vbox style={"width: " + (sbWidth - 48 - 35) + "px !important"}>
+ <vbox flex="1">
+ <hbox flex="1">
+ <label flex="2" class={nameClass}>{escapeBreakers(t.name)}</label>
+ <spacer hidden={!(t.sub || t.time)} />
+ <description flex="1" class={className('item-time-and-sub')} hidden={!(t.sub || t.time)}>{escapeBreakers(t.sub || t.time)}</description>
+ </hbox>
+ <description flex="1" class={className('item-text')}>{escapeBreakers(t.text)}</description>
<hbox>
- <label class={nameClass} style="font-weight: bold">{escapeBreakers(t.name)}</label>
- <spacer flex="1"/>
- <label>{t.sub || ''}</label>
+ <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>
</hbox>
- <description width="100%">{escapeBreakers(t.text)}</description>
</vbox>
</hbox>
</richlistitem>;
@@ -393,8 +397,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 7081ea2..e431b3b 100644
--- a/twittperator/twsidebar/chrome/content/twsidebar.css
+++ b/twittperator/twsidebar/chrome/content/twsidebar.css
@@ -52,3 +52,26 @@
.tw-anekos-sb-plugin-tweet-follow-my {
background-color: lightsalmon !important;
}
+
+.tw-anekos-sb-plugin-item-name {
+ 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-time {
+ font-size: 80%;
+}
+
+.tw-anekos-sb-plugin-item-time-and-sub {
+ font-size: 80%;
+ display: none;
+}
+