test
test
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Log in
Discord Server
May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  

Calendar

Links



Ads

    No ads available.


    Admin
    Admin
    Admin
    Admin

    Character sheet
    Some value: 2000
    Second field: 100
    https://testtesttesttest.forumotion.me
    20231010
    ~~~~~~~~~~~~~~~~

    Quick Attacking Onto NSO!

    ~~~~~~~~~~~~~~~~

    News: Pokemon Trading Card Game & Pokemon Stadium 2 Have Been Released On The NSO Service Today! Pokemo12

    Nintendo has dropped Pokemon Trading Card Game for the GBC and Pokemon Stadium 2 for the N64 on the Nintendo Switch Online service …
    Share this post on:reddit

    Comments

    Admin
    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();
    Permissions in this forum:
    You cannot reply to topics in this forum