--- a/web/res/js/live-polemic.js Sat Sep 22 15:25:25 2018 +0200
+++ b/web/res/js/live-polemic.js Sun Sep 23 14:12:38 2018 +0200
@@ -249,7 +249,8 @@
for (var j in annotations) {
if (j != "default") {
for (var k in annotations[j].keywords) {
- if (tweet.text.search(annotations[j].keywords[k]) != -1) {
+ var tweetText = tweet.full_text;
+ if (tweetText.search(annotations[j].keywords[k]) != -1) {
ann.push(j);
break;
}
@@ -268,7 +269,7 @@
}
- var tab = tweet.text.replace(twCx.urlRegExp,'').match(twCx.wordRegExp);
+ var tab = tweet.full_text.replace(twCx.urlRegExp,'').match(twCx.wordRegExp);
_(tab).each(function(w) {
var word = w.toLowerCase();
if (_(twCx.stopWords).indexOf(word) == -1 && _(tracking_keywords).indexOf(word) == -1 && word[0] != '@') {
@@ -294,7 +295,7 @@
});
_(twCx.suggestCount).each(function(_k) {
- if (tweet.text.search(_k.rgxp) != -1) {
+ if (tweet.full_text.search(_k.rgxp) != -1) {
_k.freq++;
_(ann).each(function(_a) {
_k.annotations[_a] = 1 + ( _k.annotations[_a] || 0 )
@@ -458,7 +459,7 @@
+ '" data-title="Tweet by '
+ _(tweet.user.name).escape()
+ '" data-description="'
- + _(tweet.text).escape()
+ + _(tweet.full_text).escape()
+ '" data-uri="http://twitter.com/'
+ tweet.user.screen_name
+ '/status/'
@@ -491,10 +492,10 @@
var txt = '';
tweet.html_parts.sort(function(a, b) { return a.start - b.start });
_(tweet.html_parts).each(function(_e) {
- txt += highlight( tweet.text.substring(lastend, _e.start) ) + _e.link + highlight( _e.text ) + '</a>';
+ txt += highlight( tweet.full_text.substring(lastend, _e.start) ) + _e.link + highlight( _e.text ) + '</a>';
lastend = _e.end;
});
- txt += highlight( tweet.text.substring(lastend) );
+ 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> - ';
@@ -696,7 +697,7 @@
if (twCx.filtre) {
var tweets = _(twCx.tweets).filter(function(tweet) {
var mention = '@' + tweet.user.screen_name;
- return ( tweet.text.search(twCx.filtre) != -1 ) || ( mention.search(twCx.filtre) != -1 );
+ return ( tweet.full_text.search(twCx.filtre) != -1 ) || ( mention.search(twCx.filtre) != -1 );
});
$("#inp_q").val(twCx.filtreTexte + ' (' + tweets.length + ' tweets)');
if (tweets.length) {