polygon.money = {}; polygon.money.transactions = { Page: 1, ReachedEnd: false, Loading: true, Control: "transactions", Type: "Purchases", Display: function(append, Type) { if(Type == undefined) Type = polygon.money.transactions.Type; else polygon.money.transactions.Type = Type; if(append) polygon.money.transactions.Page += 1; else polygon.money.transactions.Page = 1; $(".transactions-container .loading").removeClass("d-none"); $(".transactions-container .show-more").addClass("d-none"); if(!append) $("tbody").empty(); polygon.money.transactions.Loading = true; $.post('/api/account/get-transactions', {type: Type, page: this.Page}, function(data) { $(".transactions-container .loading").addClass("d-none"); polygon.money.transactions.Loading = false; if(data.items == undefined) return $(".transactions-container .no-items").text(data.message).removeClass("d-none"); $.each(data.items, function(_, transaction) { $('