if (localStorage.getItem("mandarin-vip") == "true") {
$(".store-logo").each((index, elem) => {
$(elem).find("a").empty();
$(elem).find("a").append(``);
});
details = JSON.parse(localStorage.getItem("mandarin-details"));
$.ajax({
type: "GET",
url: `https://vip.mandarin.club/details_refresh?email=${details["email"]}`,
dataType: "text",
success: function (data) {
if (data == "login failed") {
} else {
localStorage.setItem("mandarin-vip", "true");
localStorage.setItem("mandarin-details", data);
}
},
error: function (data) {
console.log(data);
},
});
function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
details = JSON.parse(localStorage.getItem("mandarin-details"));
current_credit = (Number(details["credits"]) / 100).toFixed(2);
$("#localization_form").html(`CR ${numberWithCommas(current_credit)}
`);
$(".account-options").attr("href", "https://mandarin.club/pages/vip-info");
interval_debug = false;
setInterval(function () {
if (!interval_debug) {
$(".blocker").remove();
$(".blocker-buynow").remove();
$(".checkout,.cart-mini-actions__checkout").prepend(`