text: $(document).ready((function(){let all_players=document.querySelector("#all"),online_players=document.querySelector("#online"),content=document.querySelector("#content-page"),links=document.querySelectorAll(".page-link");function loadContentDefault(page=0){content.innerHTML='<div class="text-center"><div class="spinner-border" role="status">\n        <span class="sr-only">Loading...</span>\n      </div></div>';let formData=new FormData;formData.append("ajax","all"),formData.append("page",page),fetch(window.location.href,{method:"POST",body:formData}).then((function(response){return response.json()})).then((function(data){data.success&&(content.innerHTML=data.content,links=document.querySelectorAll(".page-link"),console.log(links),null!=links&&links.forEach(link=>{link.addEventListener("click",e=>{let page;loadContentDefault(e.target.innerText)})}))}))}function loadContentOnline(){content.innerHTML='<div class="text-center"><div class="spinner-border" role="status">\n        <span class="sr-only">Loading...</span>\n      </div></div>';let formData=new FormData;formData.append("ajax","online"),fetch(window.location.href,{method:"POST",body:formData}).then((function(response){return response.json()})).then((function(data){console.log(data.success),data.success&&(content.innerHTML=data.content)}))}loadContentDefault(),null!=all_players&&all_players.addEventListener("click",()=>{online_players.classList.remove("active"),all_players.classList.add("active"),loadContentDefault()}),null!=online_players&&online_players.addEventListener("click",()=>{online_players.classList.add("active"),all_players.classList.remove("active"),loadContentOnline()})}));