1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 05:15:54 +00:00

Update tweet tooltip display code

This commit is contained in:
Kane York 2015-12-12 16:00:51 -08:00
parent 3eb7c58e90
commit ed71736e07
2 changed files with 16 additions and 2 deletions

View file

@ -0,0 +1 @@
package server

View file

@ -95,8 +95,21 @@ var FFZ = window.FrankerFaceZ,
} else if ( link_data.type == "twitter" ) {
tooltip = "<b>Tweet By: " + utils.sanitize(link_data.user) + "</b><hr>";
tooltip += utils.sanitize(link_data.tweet);
/*
Display Guidelines - https://about.twitter.com/company/display-requirements
[logo] Tweet
Ryan Greenberg (@greenberg) 24 Apr 2013
"Beware," wrote the prophets of San Francisco, "for what the sun giveth the wind taketh away."
*/
var ttparts = ["<span class='twitter_logo'></span> Tweet<br>",
utils.sanitize(link_data.user_display),
" (<b>@" + utils.sanitize(link_data.user) + "</b>) "];
var timestamp = utils.parse_date(link_data.timestamp);
if ( timestamp )
ttparts.push(utils.date_string(timestamp));
ttparts.push("<hr>");
ttparts.push(link_data.tweet_html || utils.sanitize(link_data.tweet));
tooltip = ttparts.join('');
} else if ( link_data.type == "reputation" ) {