Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Highlight protected user on twsidebar.

  • Loading branch information...
commit 1ed5a77f467e13ad2a55d2dafbedc2c799789b23 1 parent dc48a35
@anekos anekos authored
View
12 twittperator/twsidebar.tw
@@ -125,9 +125,12 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () {
XML.ignoreWhitespace = true;
let xml;
let sbWidth = getSidebarWindow().document.width;
+ let richlistitemClasses = [className('tweet-panel'), className('tweet-' + t.type)];
+ if (t.protected)
+ richlistitemClasses.push(className('tweet-protected'));
xml =
<richlistitem
- class={[className('tweet-panel'), className('tweet-' + t.type)].join(' ')}
+ class={richlistitemClasses.join(' ')}
style={[
"font-size: " + px(Config.fontSize - (t.text.length > 70 ? 2 : 0)),
"width: " + px(sbWidth - 100) + ' !important'
@@ -283,6 +286,8 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () {
||
(msg.direct_message);
+ let protected = msg.user && msg.user.protected;
+
// Fav test
try {
//liberator.log(JSON.stringify(msg, null, 2));
@@ -291,7 +296,8 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () {
name: '>' + msg.target_object.user.screen_name + '<',
img: msg.target_object.user.profile_image_url,
text: msg.target_object.text,
- type: 'favorite'
+ type: 'favorite',
+ protected: protected
};
appendTweet(t, 'home', streamName);
}
@@ -377,6 +383,8 @@ liberator.modules.TWAnekoSB = ANekoSB = (function () {
}
if (t) {
+ t.protected = protected;
+
if (Config.earthquake && /\u5730\u9707/.test(t.text) && msg.text.length < 20 && msg.user && msg.user.location) {
t.text += ' [\u5730\u57DF: ' + msg.user.location + ']';
}
View
4 twittperator/twsidebar/chrome/content/twsidebar.css
@@ -11,6 +11,10 @@
padding-left: 2px;
}
+.tw-anekos-sb-plugin-tweet-protected {
+ background-color: lightgray !important;
+}
+
.tw-anekos-sb-plugin-tweet-DM-my {
background-color: darkred !important;
color: white !important;
Please sign in to comment.
Something went wrong with that request. Please try again.