From 1ed5a77f467e13ad2a55d2dafbedc2c799789b23 Mon Sep 17 00:00:00 2001 From: anekos Date: Sat, 4 Aug 2012 22:37:19 +0900 Subject: Highlight protected user on twsidebar. --- twittperator/twsidebar.tw | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'twittperator/twsidebar.tw') diff --git a/twittperator/twsidebar.tw b/twittperator/twsidebar.tw index a9cc9ce..13f5b06 100644 --- a/twittperator/twsidebar.tw +++ b/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 = 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 + ']'; } -- cgit v1.2.3