MITOSBET

MITOSBET

MITOSBET | SITUS MITOSBET | LIVECHAT MITOSBET | AGEN MITOSBET | BANDAR MITOSBET | DAFTAR MITOSBET | MITOSBET DEPOSIT PULSA

/* Some global variables */ window.altum = {}; let global_token = document.querySelector('input[name="global_token"]').value; let url = document.querySelector('input[name="url"]').value; let decimal_point = document.querySelector('[name="number_decimal_point"]').value; let thousands_separator = document.querySelector('[name="number_thousands_separator"]').value; setTimeout(() => { $(".link-content").css('min-height','calc(100vh - '+($(".profile-main").height()+80)+'px)'); $("footer").css('opacity','1'); }, 500); $(".btn-tiktok-play").click(function() { $("#create_tiktok_widget").modal('show'); $("#tiktok_iframe").attr('src', $(this).attr('data-url')); }); $(".btn-youtube-play").click(function() { $("#youtube_play").modal('show'); $("#youtube_iframe").attr('src','https://www.youtube.com/embed/'+$(this).attr('data-url')); }); $("#create_tiktok_widget").on('hidden.bs.modal', function() { $("#tiktok_iframe").attr('src', ''); }); $("#youtube_play").on('hidden.bs.modal', function() { $("#youtube_iframe").attr('src', ''); }); $(document).ready(function() { setTimeout(() => { $(".twitter-card").removeClass('loading-skeleton'); }, 5000); }); if (window.innerWidth < 768) { // $('.links-slider').slick({ // dots: false, // infinite: false, // speed: 300, // slidesToShow: 4, // arrows:false, // responsive: [ // { // breakpoint: 1024, // settings: { // slidesToShow: 3, // slidesToScroll: 3, // infinite: true, // dots: false, // } // }, // { // breakpoint: 767, // settings: { // slidesToShow: 2, // slidesToScroll: 2, // } // }, // { // breakpoint: 500, // settings: { // slidesToShow: 1, // slidesToScroll: 1 // } // } // // You can unslick at a given breakpoint now by adding: // // settings: "unslick" // // instead of a settings object // ] // }); } /* Internal tracking for biolink links */ $('[data-link-url]').on('click', event => { let url = $(event.currentTarget).data('link-url'); $.ajaxSetup({ "headers": { 'X-CSRF-TOKEN': 't5lgo0wHbyIWCr3bSbhMJSlH5D9L4xl94I642l2w' } }) $.ajax({ url: "https://zaap.bio/track-link", type: "POST", data: { url: url, }, }); }); /* Go over all mail buttons to make sure the user can still submit mail */ $(".subscribe-next-btn").click(function() { if ($(this).parent().find('input').val() == '') { GrowlNotification.notify({ description: "Email is required", type: "error", position: "top-right", closeTimeout: 3000 }); return; } else { $(this).parent().addClass('d-none'); $(this).parent().removeClass('d-flex'); $(this).parent().next().addClass('d-flex'); $(this).parent().next().removeClass('d-none'); } }); $("#emailwidget").submit(function(e) { e.preventDefault(); var subscription_email = $(this).find('input[name="email"]'); var subscription_name = $(this).find('input[name="name"]'); if (subscription_name.val() == '') { GrowlNotification.notify({ description: "Name is required", type: "error", position: "top-right", closeTimeout: 3000 }); return false; } if (subscription_email.val() == '') { GrowlNotification.notify({ description: "Email is required", type: "error", position: "top-right", closeTimeout: 3000 }); return false; } $.ajaxSetup({ "headers": { 'X-CSRF-TOKEN': 't5lgo0wHbyIWCr3bSbhMJSlH5D9L4xl94I642l2w' } }) // console.log("https://zaap.bio/mitosbet"); $.ajax({ url: "https://zaap.bio/mitosbet", type: "POST", data: { subscription_email: subscription_email.val(), subscription_name: subscription_name.val() }, dataType: "json", success: (data) => { // data = JSON.parse(data); if(data.error){ GrowlNotification.notify({ description: data.error, type: "error", position: "top-right", closeTimeout: 5000 }); return false; } GrowlNotification.notify({ description: "Subscribed Successfully!", type: "success", position: "top-right", closeTimeout: 5000 }); subscription_email.val(''); subscription_name.val(''); return false; }, error: ($xhr) => { var data = $xhr.responseJSON; // console.log(data.status_code); if (data.status_code != 200) { for (i in data.errors) { GrowlNotification.notify({ description: data.errors[i][0], type: "error", position: "top-right", closeTimeout: 3000 }); } } return false; } }); }); $('form[id^="mail_"]').each((index, element) => { let link_id = $(element).find('input[name="link_id"]').val(); let is_converted = localStorage.getItem(`mail_${link_id}`); if (is_converted) { /* Set the submit button to disabled */ $(element).find('button[type="submit"]').attr('disabled', 'disabled'); } }); /* Form handling for mail submissions if any */ $('form[id^="mail_"]').on('submit', event => { let base_url = $('[name="url"]').val(); let link_id = $(event.currentTarget).find('input[name="link_id"]').val(); let is_converted = localStorage.getItem(`mail_${link_id}`); if (!is_converted) { $.ajax({ type: 'POST', url: `${base_url}link-ajax`, data: $(event.currentTarget).serialize(), success: (data) => { let notification_container = $(event.currentTarget).find( '.notification-container'); if (data.status == 'error') { notification_container.html(''); display_notifications(data.message, 'error', notification_container); } else if (data.status == 'success') { display_notifications(data.message, 'success', notification_container); setTimeout(() => { /* Hide modal */ $(event.currentTarget).closest('.modal').modal('hide'); /* Remove the notification */ notification_container.html(''); /* Set the localstorage to mention that the user was converted */ localStorage.setItem(`mail_${link_id}`, true); /* Set the submit button to disabled */ $(event.currentTarget).find('button[type="submit"]').attr( 'disabled', 'disabled'); }, 1000); } }, dataType: 'json' }); } event.preventDefault(); }); $('#form_contact').submit(function(e) { e.preventDefault(); var email = $(this).find('input[name="email"]'); var name = $(this).find('input[name="name"]'); var phone = $(this).find('input[name="phone"]'); var message = $(this).find('textarea[name="message"]'); console.log(message); var contact_form_id = $(this).find('input[name="contact_form_id"]'); var url = "https://zaap.bio/mitosbet/contact-form-submit"; if (name.attr("data-required") && name.val() == '') { GrowlNotification.notify({ description: "Name is required", type: "error", position: "top-right", closeTimeout: 3000 }); return false; } if (email.attr("data-required") && email.val() == '') { GrowlNotification.notify({ description: "Email is required", type: "error", position: "top-right", closeTimeout: 3000 }); return false; } if (phone.attr("data-required") && phone.val() == '') { GrowlNotification.notify({ description: "Phone is required", type: "error", position: "top-right", closeTimeout: 3000 }); return false; } if(message.attr("data-required") && message.val() == ''){ GrowlNotification.notify({ description: "Message is required", type: "error", position: "top-right", closeTimeout: 3000 }); return false; } $.ajaxSetup({ "headers": { 'X-CSRF-TOKEN': 't5lgo0wHbyIWCr3bSbhMJSlH5D9L4xl94I642l2w' } }) $.ajax({ url:url, type: 'POST', data: { email: email.val(), name: name.val(), phone: phone.val(), message: message.val(), contact_form_id: contact_form_id.val(), }, success: (data) => { GrowlNotification.notify({ description: "Form Submitted Successfully!", type: "success", position: "top-right", closeTimeout: 5000 }); email.val(''); name.val(''); phone.val(''); message.val(''); return false; }, error: ($xhr) => { var data = $xhr.responseJSON; // console.log(data.status_code); if (data.status_code != 200) { for (i in data.errors) { GrowlNotification.notify({ description: data.errors[i][0], type: "error", position: "top-right", closeTimeout: 3000 }); } } return false; } }); }); $(".contact-accordion-button").click(function(){ $(this).next().slideDown(500); setTimeout(() => { $(this).remove(); }, 500); });
x server