diff options
Diffstat (limited to 'twittperator/twsidebar.tw')
-rw-r--r-- | twittperator/twsidebar.tw | 12 |
1 files changed, 10 insertions, 2 deletions
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 = <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 + ']'; } |