') $(document).ready(function() { if($('.rst').length > 0) { $.get("https://brotgworld8.com/tgnumbers", function (data) { tg_results_down(data); }); } }); function tg_results_down(data) { $('.rst > .rst_tgl > .pb').append('
'); if(typeof data['lottery'] != 'undefined' && typeof data['content']['content'] != 'undefined') { var markets = data['content']['content']; var market_name = Object.keys(markets); var domain_alt= "brotgworld8.com"; var item = data['lottery']; var alt_domain_tg = "brotgworld8.com"; for (var i = 0; i < market_name.length; i++) { if(typeof item[market_name[i].toLowerCase()] == 'undefined') { continue; } var market_item = item[market_name[i].toLowerCase()]; var market = markets[market_name[i]]; var icon_desktop = 'https://brotgworld8.com/togel/' +market_name[i]+'.webp'; var html_tag = ''; html_tag += '
'; html_tag += '
'; html_tag += `
`; html_tag += ''; html_tag += '
'; html_tag += '
'+market[0]['name'].toUpperCase()+''; html_tag += '
'+market[0]['date']+' '; html_tag += ''+market[0]['result']+''; html_tag += ''; html_tag += ''; $('.rst > .rst_tgl > .pb > .result2').append(html_tag); } } var result_owl_items = 8; var result_owl_margin = 0; var result_owl_autoplay = true; var result_owl_autoplayTimeout = 2000; var result_owl_autoplayHoverPause = true; var result_owl_nav = true; if ($('.tgl').length > 8) { var result_owl_loop = true; } else { var result_owl_loop = false; } $('.owl-carousel.result2').owlCarousel({ item:result_owl_items, loop:result_owl_loop, margin:result_owl_margin, autoplay:result_owl_autoplay, autoplayTimeout:result_owl_autoplayTimeout, autoplayHoverPause:result_owl_autoplayHoverPause, nav:result_owl_nav, responsive:{ 0:{ items:1 }, 600:{ items:4 }, 1000:{ items:7 } } }) } let defaultDuration = 55; //set duration in seconds; slower = longer duration let defaultWidth = 1200; let marqueeCount = 1; let marqueeDelay = 0; $("#marquee_container.marquee > div").each(function(){ let currentWidth = $(this).width(); let newSpeed = Math.ceil(defaultDuration*(currentWidth/defaultWidth)); $(this).css("animation", "marquee" + marqueeCount + " " + newSpeed + "s linear infinite"); $(this).css("animation-delay", marqueeDelay + "s"); marqueeDelay = (newSpeed*marqueeCount)/3; marqueeCount++; }); // for global deposit download qris web function downloadImage(url, name, transfer_type){ // check transfer_type if( transfer_type == "qr"){ let split_name = name.split("-"); name = `${split_name[0]}-${split_name[1]}`; } var req = new XMLHttpRequest(); // url = url.replace(/^https:\/\//i, 'http://'); req.open("GET", url, true); req.setRequestHeader("Cache-Control", "no-cache, no-store, must-revalidate"); req.responseType = "blob"; req.onload = function (event) { var blob = req.response; var link=document.createElement('a'); link.href=window.URL.createObjectURL(blob); link.download=name; link.click(); }; req.send(); } function downloadQRDynamic(svgBase64, name) { var canvas = document.createElement("canvas"); var context = canvas.getContext("2d"); var img = new Image(); img.onload = function() { var borderWidth = 4; // Adjust the border width as needed var borderColor = 'white'; // Adjust the border color as needed // Set canvas size to include border canvas.width = img.width + 2 * borderWidth; canvas.height = img.height + 2 * borderWidth; // Draw the border context.strokeStyle = borderColor; context.lineWidth = borderWidth; context.strokeRect(0, 0, canvas.width, canvas.height); // Draw the image inside the border context.drawImage(img, borderWidth, borderWidth); var pngData = canvas.toDataURL("image/png"); var a = document.createElement("a"); a.download = `${name}.png`; a.href = pngData; document.body.appendChild(a); a.click(); document.body.removeChild(a); }; img.src = "data:image/svg+xml;base64," + svgBase64; } // For PIN ON / OFF status on Profile let triggered_by_event = 0; $('#proteksi-pin').change(function(){ if(!this.checked){ $('#proteksi-pin').prop('disabled', true); let info_off_pin = `Me-nonaktifkan PIN tidak dianjurkan
Jika anda sering login di tempat umum
PROSES`; uialert2(`${info_off_pin}`); }else{ if(triggered_by_event){ triggered_by_event = 0; }else{ $('#proteksi-pin').prop('disabled', true); location.href = 'https://brotgworld8.com/profile/pin-on'; } } }); $('#uialert_modal').on('hidden.bs.modal', function (e) { // Only execute if modal triggered by PIN ON / OFF. // Other trigger modal scenario, Ex: Validation after submit form let modal_content = $('#uialert_content').text(); if(modal_content.includes("Me-nonaktifkan PIN")){ triggered_by_event = 1; // When close modal, PIN will change back to ON which will trigger "change" event $('#proteksi-pin').prop('disabled', false); $('#proteksi-pin').bootstrapToggle('on'); } }) $(document).ready(function(){ let our_partner = $('.ourpartner').length; console.log('our_partner', our_partner); if(our_partner > 0){ $('.ourpartner > .container').css('margin-top', "-1rem"); } }); let email_interval, wa_interval, sms_interval; let countdown_email_otp = 120; let countdown_wa_otp = 120; let countdown_sms_otp = 120; function countdownIntervalEmail(){ $('.btn-email-otp').prop('disabled', true); countdown_email_otp--; if(countdown_email_otp <= 0){ clearInterval(email_interval); countdown_email_otp = 0; $('.btn-email-otp').removeAttr('disabled'); } let loading = ` ${countdown_email_otp} Detik `; $('.countdown_email_otp').html(loading); if(countdown_email_otp <= 0){ $('.countdown_email_otp').css('display', 'none'); $('.check_email_otp').css('display', 'none'); } } function countdownIntervalWA() { $('.btn-wa-otp').prop('disabled', true); countdown_wa_otp--; if(countdown_wa_otp <= 0){ clearInterval(wa_interval); countdown_wa_otp = 0; $('.btn-wa-otp').removeAttr('disabled'); } let loading = ` ${countdown_wa_otp} Detik `; $('.countdown_wa_otp').html(loading); if(countdown_wa_otp <= 0){ $('.countdown_wa_otp').css('display', 'none'); } } function countdownIntervalSMS() { $('.btn-sms-otp').prop('disabled', true); countdown_sms_otp--; if(countdown_sms_otp <= 0){ clearInterval(sms_interval); countdown_sms_otp = 0; $('.btn-sms-otp').removeAttr('disabled'); } let loading = ` ${countdown_sms_otp} Detik `; $('.countdown_sms_otp').html(loading); if(countdown_sms_otp <= 0){ $('.countdown_sms_otp').css('display', 'none'); } } function resendEmailOtp() { const email = $('#email').val(); if( email === null || email == ""){ const label_required_email = "Mohon isikan Email"; uialert2(label_required_email); return; } const url = "https://brotgworld8.com/user/referral/verification/send-email-otp"; const data = {'_token' : 'xEWAfWEg2kyeyRDivHJxZti7kJfpBAqrYQrgtJii', 'email': email}; $('.btn-email-otp').prop('disabled', true); $.ajax({ type: "POST", url: url, data: data, dataType: 'json', beforeSend: function(){ $('.countdown_email_otp').removeAttr('style'); const loading = ` Loading `; $(".countdown_email_otp").html(loading); }, success: function(resp){ if( resp.status == 403){ uialert2(`${resp.message}`); $('.countdown_email_otp').css('display', 'none'); $('.btn-email-otp').removeAttr('disabled'); }else if( resp.is_limit_retry ){ let delay_message = "Mohon Coba Kembali :minutes Menit Kemudian"; let label_delay_message = delay_message.replace(':minutes', resp.minutes); uialert2(label_delay_message); $('.countdown_email_otp').css('display', 'none'); $('.btn-email-otp').removeAttr('disabled'); }else{ $('.countdown_email_otp').removeAttr('style'); $('.check_email_otp').removeAttr('style'); countdown_email_otp = resp.seconds; email_interval = setInterval(countdownIntervalEmail,1000); } }, error: function (error) { $('.countdown_email_otp').css('display', 'none'); $('.btn-email-otp').removeAttr('disabled'); uialert2(`${error.responseJSON.message}`); console.log(error); } }); } function resendWAOtp() { const page = "home"; const phone = $('#phone').val(); if( page !== "withdraw"){ if( phone === null || phone == ""){ const label_required_phone = "Mohon isikan Nomor Telepon"; uialert(label_required_phone); return; } } const url = "https://brotgworld8.com/user/referral/verification/send-wa-otp"; const data = {'_token' : 'xEWAfWEg2kyeyRDivHJxZti7kJfpBAqrYQrgtJii', 'phone': phone, 'page': page}; $('.btn-wa-otp').prop('disabled', true); $.ajax({ type: "POST", url: url, data: data, dataType: 'json', beforeSend: function(){ $('.countdown_wa_otp').removeAttr('style'); const loading = ` Loading `; $(".countdown_wa_otp").html(loading); }, success: function(resp){ if( resp.is_limit_retry ){ let delay_message = "Mohon Coba Kembali :minutes Menit Kemudian"; let label_delay_message = delay_message.replace(':minutes', resp.minutes); uialert2(label_delay_message); $('.countdown_wa_otp').css('display', 'none'); $('.btn-wa-otp').removeAttr('disabled'); }else{ $('.countdown_wa_otp').removeAttr('style'); countdown_wa_otp = resp.seconds; wa_interval = setInterval(countdownIntervalWA,1000); } }, error: function (error) { $('.countdown_wa_otp').css('display', 'none'); $('.btn-wa-otp').removeAttr('disabled'); uialert2(`${error.responseJSON.message}`); console.log(error); } }); } function resendSMSOtp() { const page = "home"; const phone = $('#phone').val(); if( page !== "withdraw"){ if( phone === null || phone == ""){ const label_required_phone = "Mohon isikan Nomor Telepon"; uialert(label_required_phone); return; } } const url = "https://brotgworld8.com/user/referral/verification/send-sms-otp"; const data = {'_token' : 'xEWAfWEg2kyeyRDivHJxZti7kJfpBAqrYQrgtJii', 'phone': phone, 'page': page}; $('.btn-sms-otp').prop('disabled', true); $.ajax({ type: "POST", url: url, data: data, dataType: 'json', beforeSend: function(){ $('.countdown_sms_otp').removeAttr('style'); const loading = ` Loading `; $(".countdown_sms_otp").html(loading); }, success: function(resp){ if( resp.is_limit_retry ){ let delay_message = "Mohon Coba Kembali :minutes Menit Kemudian"; let label_delay_message = delay_message.replace(':minutes', resp.minutes); uialert2(label_delay_message); $('.countdown_sms_otp').css('display', 'none'); $('.btn-sms-otp').removeAttr('disabled'); }else{ $('.countdown_sms_otp').removeAttr('style'); countdown_sms_otp = resp.seconds; sms_interval = setInterval(countdownIntervalSMS,1000); } }, error: function (error) { $('.countdown_sms_otp').css('display', 'none'); $('.btn-sms-otp').removeAttr('disabled'); uialert2(`${error.responseJSON.message}`); console.log(error); } }); } function setCookiesPromoPopup(){ const promo_popup_exp = new Date(); promo_popup_exp.toLocaleString('id-ID', { timeZone: 'Asia/Jakarta' }); //exp :Tue Jan 22 2024 17:01:00 GMT+0700 (Indochina Time) promo_popup_exp.setDate(promo_popup_exp.getDate() + 1); //add day next day promo_popup_exp.setHours(0,1,0,0); // midnight // console.log('promo_popup_exp:', promo_popup_exp); // console.log('promo_popup_exp UTC:', promo_popup_exp.toUTCString()); //UTC + 0 document.cookie = "promo_showed=false;" + "Path=/; expires=" + promo_popup_exp.toUTCString(); } const popup_cookies = getCookie('promo_showed'); if( popup_cookies !== null){ //remove all id element myModalHome $('[id^="myModalHome"]').remove(); $("#checkbox-popup-promo").prop('checked', true); } $('#btn-showed-promo').on( "click", function() { setCookiesPromoPopup(); $('#myModalHome').modal('hide'); }); function setLanguage(lang){ $.ajax({ url: "https://brotgworld8.com/set-lang", method: 'GET', data: { // '_token' : 'xEWAfWEg2kyeyRDivHJxZti7kJfpBAqrYQrgtJii', 'lang': lang, }, success: function(resp){ window.location.reload(); }, error: function(err){ window.location.reload(); } }); } var destination_crypto = []; function getAddressWallet(take_address=0){ userAddressWallet(take_address); } function cryptoCurrDest(event) { $("#crypto-wallet-content").css({display:'none'}); $("#crypto_info").css({display:'none'}); // check if option exist const total_option_curr = $("#deposit-crypto option").length; if( total_option_curr == 0){ return; } let crypto_val, selected_crypto_index; if( event == undefined){ selected_crypto_index = $("#deposit-crypto").prop("selectedIndex"); crypto_val = $("#deposit-crypto").prop("selectedIndex", selected_crypto_index).val(); }else{ crypto_val = $(event).val(); } let crypto_network = $("#crypto-network option"); destination_crypto = []; crypto_network.each(function(){ let coin_type = $(this).data('crypto-curr'); // Show or hide options based on the selected coin_val if (coin_type === crypto_val) { $(this).show(); //check index elemet if( destination_crypto.length == 0){ const crypto_curr = $(this).data('crypto-type'); const network_type = $(this).data('crypto-network'); const crypto_id = $(this).data('crypto-id'); const crypto_min_dp = $(this).data('crypto-mindp'); destination_crypto.push({"crypto_curr": crypto_curr, "crypo_min_dp":crypto_min_dp, "coin_type": coin_type, "network_type": network_type, "crypto_id": crypto_id}); $(this).prop("selected", true); }else{ $(this).prop("selected", false); } } else { $(this).hide(); $(this).prop("selected", false); } }); // get data destination coin & network userAddressWallet(); } function cryptoNetworkDest(event) { $("#crypto-wallet-content").css({display:'none'}); $("#crypto_info").css({display:'none'}); $("#crypto-wallet-content").css({display:'none'}); $("#crypto_info").css({display:'none'}); // check if option exist const total_option_network = $("#crypto-network option").length; if( total_option_network == 0){ return; } // remove previous selected const selected_network = $("#crypto-network").find('option:selected'); const coin_type = selected_network.data('crypto-curr'); const crypto_curr = $(this).data('crypto-type'); const network_type = selected_network.data('crypto-network'); const crypto_id = selected_network.data('crypto-id'); const crypto_min_dp = selected_network.data('crypto-mindp'); destination_crypto[0]= {"crypto_curr": crypto_curr, "crypo_min_dp":crypto_min_dp, "coin_type": coin_type, "network_type": network_type, "crypto_id": crypto_id}; userAddressWallet(); } var crypto_price_interval; function cryptoLivePrice() { // stop previous interval clearInterval(crypto_price_interval); const time_run = (1 * 60 * 1000); // 1mnt crypto_price_interval = setInterval(function() { // get user address wallet const crypto_dest = destination_crypto[0]; $.ajax({ url: "https://brotgworld8.com/crypto-price", method: 'POST', data: { '_token' : 'xEWAfWEg2kyeyRDivHJxZti7kJfpBAqrYQrgtJii', 'coin_type': crypto_dest.coin_type, }, beforeSend: function(){ $("#crypto-price").html(`Loading...`); }, success: function(value){ $(`#crypto-price`).html(`Rp. ${number_format(value,2)} `); } }); }, time_run); } function userAddressWallet(take_address=0) { // console.log("crypto cur destination_crypto", destination_crypto); // get user address wallet const crypto_dest = destination_crypto[0]; $.ajax({ url: "https://brotgworld8.com/user-address-crypto", method: 'POST', data: { '_token' : 'xEWAfWEg2kyeyRDivHJxZti7kJfpBAqrYQrgtJii', 'take_address':take_address, 'coin_type': crypto_dest.coin_type, 'network_type': crypto_dest.network_type, 'crypto_id': crypto_dest.crypto_id, }, beforeSend: function(){ $("#wrap-btn-get-wallet").css({display:'none'}); $("#deposit-crypto").attr('disabled', true); $("#crypto-network").attr('disabled', true); $("#btn-get-wallet").attr('disabled', true); $("#btn-get-wallet").attr('disabled', true); $("#crypto-wallet-content").css({display:'none'}); $("#crypto_info").css({display:'none'}); $("#crypto_loading").css({display:'flex'}); }, success: function(resp){ if( resp.status == 200 ){ // run fetch live price cryptoLivePrice(); $(`#crypto-barcode`).attr('src', 'data:image/svg+xml;base64,' + resp.barcode); $(`#crypto-user-wallet`).html(`${resp.user_address}`); $(`#crypto-price`).html(`Rp. ${number_format(resp.live_price,2)} `); $("#crypto-wallet-content").css({display:'flex'}); // crypto info const init_info = "Hanya kirim :curr_1 ke alamat deposit ini. Koin akan otomatis didepositkan setelah 6 kali konfirmasi jaringan pada alamat smart contract. Minimal Deposit: :min_dp :curr_2"; const replace_info = init_info.replace(":curr_1", crypto_dest.crypto_curr).replace(':min_dp', crypto_dest.crypo_min_dp).replace(":curr_2", crypto_dest.crypto_curr); $("#crypto_info").html(`${replace_info}`); $("#crypto_info").css({display:'flex'}); }else if(resp.status == 204){ // user didn't get the wallet // show button get wallet $("#wrap-btn-get-wallet").css({display:'block'}); }else{ uialert2(resp.msg); // hide button get wallet // cause by stock was empty $("#wrap-btn-get-wallet").css({display:'none'}); } // hide loading $("#crypto_loading").css({display:'none'}); $("#deposit-crypto").attr('disabled', false); $("#crypto-network").attr('disabled', false); $("#btn-get-wallet").attr('disabled', false); $("#btn-get-wallet").attr('disabled', false); }, error: function(resp){ $("#deposit-crypto").attr('disabled', false); $("#crypto-network").attr('disabled', false); $("#btn-get-wallet").attr('disabled', false); $("#btn-get-wallet").attr('disabled', false); } }); } $(document).ready(function () { })