News: Pokemon Trading Card Game & Pokemon Stadium 2 Have Been Released On The NSO Service Today!
20231010
News: Pokemon Trading Card Game & Pokemon Stadium 2 Have Been Released On The NSO Service Today!
Admin- Admin
Character sheet
Some value: 2000
Second field: 100
News: Pokemon Trading Card Game & Pokemon Stadium 2 Have Been Released On The NSO Service Today! :: Comments
- Code:
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();
Similar topics
» WiiWareWave News: The Legend of Heroes ~ Trails Into Reverie (PS4 Retail)
» News: Charles Martinet Retiring As The Voice of Mario After Nearly Three Decades of Voicing The Iconic Character.
» News: Nintendo Has Announced A Nintendo Direct For Tomorrow September 14th!
» News: Charles Martinet Retiring As The Voice of Mario After Nearly Three Decades of Voicing The Iconic Character.
» News: Nintendo Has Announced A Nintendo Direct For Tomorrow September 14th!
Permissions in this forum:
You cannot reply to topics in this forum
Mon Apr 29, 2024 11:26 am by Admin
» Code
Wed Apr 24, 2024 4:46 pm by Admin
» fdfdfdfdfd
Mon Apr 15, 2024 12:41 pm by Admin
» safadfadfdffd
Mon Apr 15, 2024 9:21 am by Admin
» One more topic
Wed Apr 03, 2024 9:09 am by Admin