Unverified Commit 923f250d authored by Roland Denis's avatar Roland Denis
Browse files

Display twitter div only when timeline is fully loaded

parent 0fe7e9c5
Pipeline #2476 passed with stages
in 29 seconds
......@@ -112,7 +112,7 @@
</div>
</div>
<div class="container-fluid mt-4 px-0 twitter">
<div class="container-fluid mt-4 px-0 twitter" style="display:none">
<div class="container pb-4">
<a id="twitter-share" class="share d-flex flex-row-reverse p-4" href="#">Partager</a>
<h1 class="pt-4">GroupeCalcul@twitter</h1>
......@@ -147,14 +147,20 @@
}
var customizeTweetMedia = function() {
jQuery('.twitter').find('.twitter-timeline').css('display', 'none');
jQuery('#twitter-text').html(twitter_find('p.timeline-Tweet-text').html());
jQuery('#twitter-date').html(capitalizeFirstLetter(twitter_find('time').attr('aria-label').substring(7)));
jQuery('#twitter-share').attr('href', twitter_find('a.timeline-ShareMenu-option').attr('href'));
jQuery('#twitter-hashtag').html('');
twitter_find('a.hashtag').each(function () {
jQuery('#twitter-hashtag').append($(this).text() + ' ');
});
try {
jQuery('.twitter').find('.twitter-timeline').css('display', 'none');
jQuery('#twitter-text').html(twitter_find('p.timeline-Tweet-text').html());
jQuery('#twitter-date').html(capitalizeFirstLetter(twitter_find('time').attr('aria-label').substring(7)));
jQuery('#twitter-share').attr('href', twitter_find('a.timeline-ShareMenu-option').attr('href'));
jQuery('#twitter-hashtag').html('');
twitter_find('a.hashtag').each(function () {
jQuery('#twitter-hashtag').append($(this).text() + ' ');
});
jQuery('div.twitter').show();
}
catch(err) {
jQuery('div.twitter').hide();
}
}
jQuery('.twitter').find('.twitter-timeline').contents().find('.timeline-TweetList').bind('DOMSubtreeModified propertychange', function() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment