testfdfdfd
I forgot my password
Log in automatically
Calendar
No ads available.
let boxCards = $('li#boxCards'); let index = 0; function loadTopic() { if (index < boxCards.length) { let latLink = boxCards.find('div.topicTitle a.topictitle').eq(index), parentLink = latLink.attr('href'); $.ajax({ url: parentLink, type: 'GET', dataType: "html", success: function(rowTopics) { let $rowTopics = $(rowTopics); let findElement = $rowTopics.find('.postbody .content.clearfix'); let lastPostText = findElement.last().html(); let truncatedLastPost = lastPostText.replace(/<img[^>]*>/g, '').substring(0, 180); if (lastPostText.length > 180) truncatedLastPost += '...'; boxCards.eq(index).find('.descriptionTopic').prepend(truncatedLastPost); var $authColor = $('.authorName span.color-groups', boxCards.eq(index)), $getColor = $($authColor).attr('style'); $($authColor).closest('li#boxCards').attr('style','border-'+$getColor); $($authColor).closest('li#boxCards').find('.avatarHead').attr('style','background-'+$getColor+'40'); $('.buttonsLeft a[href*="view=newest"]', boxCards.eq(index)).closest('li#boxCards').addClass('newPost'); }, error: function(err) { console.log("AJAX error in request (Load topics)", err); }, complete: function() { index++; loadTopic(); } }); } } loadTopic();
let boxCards = $('li#boxCards');
let index = 0;
function loadTopic() {
if (index < boxCards.length) {
let latLink = boxCards.find('div.topicTitle a.topictitle').eq(index),
parentLink = latLink.attr('href');
$.ajax({
url: parentLink,
type: 'GET',
dataType: "html",
success: function(rowTopics) {
let $rowTopics = $(rowTopics);
let findElement = $rowTopics.find('.postbody .content.clearfix');
let lastPostText = findElement.last().html();
let truncatedLastPost = lastPostText.replace(/<img[^>]*>/g, '').substring(0, 180);
if (lastPostText.length > 180) truncatedLastPost += '...';
boxCards.eq(index).find('.descriptionTopic').prepend(truncatedLastPost);
var $authColor = $('.authorName span.color-groups', boxCards.eq(index)),
$getColor = $($authColor).attr('style');
$($authColor).closest('li#boxCards').attr('style','border-'+$getColor);
$($authColor).closest('li#boxCards').find('.avatarHead').attr('style','background-'+$getColor+'40');
$('.buttonsLeft a[href*="view=newest"]', boxCards.eq(index)).closest('li#boxCards').addClass('newPost');
},
error: function(err) {
console.log("AJAX error in request (Load topics)", err);
},
complete: function() {
index++;
loadTopic();
}
});
}
}
loadTopic();