--- a/web/res/js/live-polemic.js Wed Dec 11 11:04:27 2019 +0100
+++ b/web/res/js/live-polemic.js Wed Dec 11 14:30:18 2019 +0100
@@ -482,7 +482,7 @@
html += ' style="display: none"';
}
html += '>';
- if (tweet.annotations.length) {
+ if (tweet.annotations && tweet.annotations.length) {
html += '<div class="annotations">';
for (var i in tweet.annotations) {
html += '<div class="annotation" style="width:' + (100/tweet.annotations.length) + '%; background:' + getColor(tweet.annotations[i], (className == 'icons' ? .4 : .85)).hex + '"></div>';
@@ -507,10 +507,10 @@
txt += highlight( tweet.full_text.substring(lastend) );
html += '<p class="tweet_text"><b>' + a_user + highlight('@' + tweet.user.screen_name) + '</a>' + ( className == 'full' ? ' (' + tweet.user.name + ')</b><br />' : '</b> : ') + txt + '</p>';
if (className == 'full' && el == 'li') {
- html += '<div class="tweet_actions"><a href="http://twitter.com/' + tweet.user.screen_name + '/status/' + tweet.id + '" onclick="tweetPopup(this.href); return false;" target="_blank">afficher tweet</a> - ';
- html += '<a href="http://twitter.com/intent/tweet?in_reply_to=' + tweet.id + '" onclick="tweetPopup(this.href); return false;" target="_blank">répondre</a> · ';
- html += '<a href="http://twitter.com/intent/retweet?tweet_id=' + tweet.id + '" onclick="tweetPopup(this.href); return false;" target="_blank">retweeter</a> · ';
- html += '<a href="http://twitter.com/intent/favorite?tweet_id=' + tweet.id + '" onclick="tweetPopup(this.href); return false;" target="_blank">favori</a></div>';
+ html += '<div class="tweet_actions"><a href="https://twitter.com/' + tweet.user.screen_name + '/status/' + tweet.id + '" onclick="tweetPopup(this.href); return false;" target="_blank">afficher tweet</a> - ';
+ html += '<a href="https://twitter.com/intent/tweet?in_reply_to=' + tweet.id + '" onclick="tweetPopup(this.href); return false;" target="_blank">répondre</a> · ';
+ html += '<a href="https://twitter.com/intent/retweet?tweet_id=' + tweet.id + '" onclick="tweetPopup(this.href); return false;" target="_blank">retweeter</a> · ';
+ html += '<a href="https://twitter.com/intent/favorite?tweet_id=' + tweet.id + '" onclick="tweetPopup(this.href); return false;" target="_blank">favori</a></div>';
}
}
html += '</div></' + el + '>';
@@ -550,7 +550,7 @@
var x,
y,
dt = tweet.date_value,
- ann = ( annotation ? annotation : ( tweet.annotations.length ? tweet.annotations[0] : 'default' ) );
+ ann = ( annotation ? annotation : ( tweet.annotations && tweet.annotations.length ? tweet.annotations[0] : 'default' ) );
for (var i = 0; i < twCx.tlOnDisplay.length; i++) {
if (twCx.tlOnDisplay[i].end > dt) {
y = twCx.tlHeight - (i + .5) * twCx.scaleY;
@@ -857,7 +857,7 @@
var tweetid = twCx.tlOnDisplay[i].tweets[j],
tweet = tweetById(tweetid);
if (tweet) {
- if (tweet.annotations.length) {
+ if (tweet.annotations && tweet.annotations.length) {
for (var k in tweet.annotations) {
displayData[tweet.annotations[k]].push(tweetid);
}