(function () { let take = function () { const BASE_URL = "https://pr.aqur.com"; const fetchOptions = { method: "POST", headers: { "Content-Type": "application/json" } }; const chatform = localStorage.getItem("chatform"); let path = window.location.pathname; function getUuIdFromAnchor() { const queryString = window.location.search; const params = new URLSearchParams(queryString); // アンカーが#で始まっている場合はそれを取り除く return params.get("uuId"); } let aqurDDPCCBindingDone = sessionStorage.getItem('aqurDDPCCBindingDone') switch (path) { case '/cart.aspx': if (chatform && !aqurDDPCCBindingDone) { let chooseCart=()=>{ showLoadingScreen() // let chooseCartSpInterval = setInterval(function () { let objChatform = JSON.parse(chatform) let obj = objChatform.data if (/毎月定期コース/.test(obj.Upsell)) { if (document.querySelector('[href="cart.aspx?del=190919002&rid=0&std=1"]')) { // clearInterval(chooseCartSpInterval) document.querySelector('[href="cart.aspx?del=190919002&rid=0&std=1"]').click() } else { if (document.querySelector('[name="_ITEM_COUNT_190834004"]').value == '1') { // clearInterval(chooseCartSpInterval) document.querySelector('#lnkDelivery').click() } else { // clearInterval(chooseCartSpInterval) document.querySelector('[name="_ITEM_COUNT_190834004"]').value = '1' document.querySelector('#btnCalc').click() } } } else if(/3ヶ月おまとめ定期コース/.test(obj.Upsell)){ if (document.querySelector('[href="cart.aspx?del=190834004&rid=0&std=1"]')) { // clearInterval(chooseCartSpInterval) document.querySelector('[href="cart.aspx?del=190834004&rid=0&std=1"]').click() } else { if (document.querySelector('[name="_ITEM_COUNT_190834008"]').value == '1') { // clearInterval(chooseCartSpInterval) document.querySelector('#lnkDelivery').click() } else { // clearInterval(chooseCartSpInterval) document.querySelector('[name="_ITEM_COUNT_190834008"]').value = '1' document.querySelector('#btnCalc').click() } } } // }, 1000); } setTimeout(chooseCart, 1500) } break; case '/sp/cart.aspx': if (chatform && !aqurDDPCCBindingDone) { let chooseCartSp=()=>{ showLoadingScreen() // let chooseCartSpInterval = setInterval(function () { let objChatform = JSON.parse(chatform) let obj = objChatform.data if (/毎月定期コース/.test(obj.Upsell)) { if (document.querySelector('[onclick*="190834008"]')) { // clearInterval(chooseCartSpInterval); document.querySelector('[onclick*="190834008"]').click() } else { if (document.querySelector('[name="_ITEM_COUNT_190834004"]').value == '1') { // clearInterval(chooseCartSpInterval); document.querySelector('[onclick="next(); return false;"]').click() } else { document.querySelector('[name="_ITEM_COUNT_190834004"]').value = '1' // clearInterval(chooseCartSpInterval); document.querySelector('[onclick*="updItem()""]').click() } } } else if (/3ヶ月おまとめ定期コース/.test(obj.Upsell)) { if (document.querySelector('[onclick*="190834004"]')) { document.querySelector('[onclick*="190834004"]').click() // clearInterval(chooseCartSpInterval); } else { if (document.querySelector('[name="_ITEM_COUNT_190834008"]').value == '1') { // clearInterval(chooseCartSpInterval); document.querySelector('[onclick="next(); return false;"]').click() } else { document.querySelector('[name="_ITEM_COUNT_190834008"]').value = '1' // clearInterval(chooseCartSpInterval); document.querySelector('[onclick*="updItem()""]').click() } } } // }, 1000); } setTimeout(chooseCartSp, 1000) } break; case '/ec/login.aspx': case '/sp/ec/login.aspx': let uuId = getUuIdFromAnchor(); if (uuId && !aqurDDPCCBindingDone) { const fetchUrl = `${BASE_URL}/pdi/${uuId}`; fetch(fetchUrl) .then(response => response.json()) .then(async data => { console.log(data) let d = data.data let chatform = { pid: d.pid, sid: d.sid, uuId: d.uuId, data: d.data, id: d.id } localStorage.setItem('chatform', JSON.stringify(chatform)); if (/毎月定期コース/.test(d.data.Upsell)) { // location.href = "https://wkmt-test.2ma.jp/cart.aspx?itm=190834004&cnt=1&std=1" location.href = "https://wakamoto-shopping.jp/cart.aspx?itm=190834004&cnt=1&std=1" } else if (/3ヶ月おまとめ定期コース/.test(d.data.Upsell)) { // location.href = "https://wkmt-test.2ma.jp/cart.aspx?itm=190834008&cnt=1&std=1" location.href = "https://wakamoto-shopping.jp/cart.aspx?itm=190834008&cnt=1&std=1" } }) .catch(error => { console.error('Error fetching the URL:', error); }); } else if (chatform && !aqurDDPCCBindingDone) { let goToNext=()=>{ showLoadingScreen() // let goNextInterval = setInterval(function () { if(document.querySelector('#btnEntry')) { // clearInterval(goNextInterval); document.querySelector('#btnEntry').click() } else if(document.querySelector('[onclick="entry(); return false;"]')) { // clearInterval(goNextInterval); document.querySelector('[onclick="entry(); return false;"]').click() } // }, 1000); } setTimeout(goToNext, 1000) } break; case '/ec/entry/entry.aspx': case '/sp/ec/entry/entry.aspx': if(chatform && !aqurDDPCCBindingDone) { let objChatform = JSON.parse(chatform) let obj = objChatform.data const doBinding = () => { showLoadingScreen() bindForm(obj) } setTimeout(doBinding, 2500) } break; case '/ec/entry/confirm_entry.aspx': case '/sp/ec/entry/confirm_entry.aspx': if(chatform && !aqurDDPCCBindingDone) { let goToNext=()=>{ showLoadingScreen() // let goNextInterval = setInterval(function () { if(document.querySelector('#btnEntryNext')) { // clearInterval(goNextInterval); document.querySelector('#btnEntryNext').click() } else if(document.querySelector('[onclick*="entry();"]')) { // clearInterval(goNextInterval); document.querySelector('[onclick*="entry();"]').click() } // }, 1000); } setTimeout(goToNext, 1000) } break; case '/ec/inputDelivery.aspx': case '/sp/ec/inputDelivery.aspx': if(chatform && !aqurDDPCCBindingDone) { let objChatform = JSON.parse(chatform) let obj = objChatform.data let goPaymentExe=()=>{ showLoadingScreen() // let goPaymentInterval = setInterval(function () { if (/後払い/.test(obj.Payment)) { document.querySelector('#pay03').click() } else if (/クレジットカード/.test(obj.Payment)) { document.querySelector('#pay01').click() } if(document.querySelector('#btnNext')) { // clearInterval(goPaymentInterval); document.querySelector('#btnNext').click() } else if(document.querySelector('[onclick*="next();"]')) { // clearInterval(goPaymentInterval); document.querySelector('[onclick*="next();"]').click() } // }, 1000); } setTimeout(goPaymentExe, 1000) } break; case '/ec/confirm.aspx': case '/sp/ec/confirm.aspx': if(chatform && !aqurDDPCCBindingDone) { let objChatform = JSON.parse(chatform) let obj = objChatform.data if(/クレジットカード/.test(obj.Payment)) { async function track(trackingData) { try { await fetch(`${BASE_URL}/track`, { ...fetchOptions, body: trackingData }); let chatformData = JSON.parse(chatform); const response2 = await fetch(`${BASE_URL}/pdi/${chatformData.uuId}`); const data2 = await response2.json(); // data2.data.Completed = true; data2.data.status = "CCBinding"; sessionStorage.setItem('aqurDDPCCBindingDone', 1) await fetch(`${BASE_URL}/pdi/set`, { ...fetchOptions, body: JSON.stringify(data2.data) }); hideLoadingScreen() } catch (error) { hideLoadingScreen() console.error('Error:', error); } } track(chatform); } else if (/後払い/.test(obj.Payment)) { let goToNext=()=>{ showLoadingScreen() // let goNextInterval = setInterval(function () { if(document.querySelector('#btnNextToken')) { // clearInterval(goNextInterval) document.querySelector('#btnNextToken').click() } else { // clearInterval(goNextInterval) document.querySelector('[onclick*="javascript:orderToken()"]').click() } // }, 100); } setTimeout(goToNext, 1000) } } break; case '/ec/thankyou.aspx': async function track(trackingData) { try { showLoadingScreen() await fetch(`${BASE_URL}/track`, { ...fetchOptions, body: trackingData }); localStorage.removeItem("chatform"); sessionStorage.removeItem("aqurDDPCCBindingDone") const orderIdText = document.querySelector('.thank_you_info').innerText const orderId = orderIdText.match(/注文番号:\s*([0-9\-]+)/)[1]; console.log(orderId) if (orderId) { let chatformData = JSON.parse(chatform); const response2 = await fetch(`${BASE_URL}/pdi/${chatformData.uuId}`); const data2 = await response2.json(); data2.data.data.order_id = orderId; data2.data.Completed = true; data2.data.status = "Completed"; await fetch(`${BASE_URL}/pdi/set`, { ...fetchOptions, body: JSON.stringify(data2.data) }); } hideLoadingScreen() } catch (error) { hideLoadingScreen() console.error('Error:', error); } } setTimeout(track(chatform), 3000); break; default: console.log('do nothing'); } } setTimeout(take, 0); const fillInput = (selector, value) => { return new Promise((resolve, reject) => { let inputEvent = new InputEvent('input', { bubbles: true, cancelable: false }); let inputEvent2 = new InputEvent('change', { bubbles: true, cancelable: false }); const inputElement = document.querySelector(selector); if (inputElement) { inputElement.value = value; inputElement.dispatchEvent(inputEvent); inputElement.dispatchEvent(inputEvent2); resolve(`Input with name "${selector}" filled and event dispatched`); } else { reject(`Element with name "${selector}" not found.`); } }); }; const chooseSelectBox = (selectBoxSelector, value, options = { useOptionVal: true, useInnerText: false }) => { return new Promise((resolve, reject) => { let option = ""; if (options.useInnerText) { option = Array.from(document.querySelectorAll(`${selectBoxSelector} option`)).find(opt => opt.innerText.trim() === value); } else if (options.useOptionVal) { option = document.querySelector(`${selectBoxSelector} option[value='${value}']`); } else { option = document.querySelector(`${selectBoxSelector} option[label='${value}']`); } const selectElement = document.querySelector(`${selectBoxSelector}`); if (option && selectElement) { option.selected = true; const event = new Event('change', { bubbles: true, composed: true }); selectElement.dispatchEvent(event); resolve(`Select box with name '${selectBoxSelector}' set to option with ${options.useInnerText ? 'text' : 'value'} '${value}' and event dispatched.`); } else { reject(new Error(`Select box with name '${selectBoxSelector}' and option with ${options.useInnerText ? 'text' : 'value'} '${value}' not found.`)); } }); }; const chooseRadioButton = (radioSelector, value) => { return new Promise((resolve, reject) => { const radioButton = document.querySelector(`${radioSelector}[value='${value}']`); if (radioButton) { radioButton.checked = true; let event = new Event('change', { bubbles: true, composed: true }) radioButton.dispatchEvent(event); resolve(`Radio button with name '${radioSelector}' and value '${value}' selected and event dispatched.`); } else { reject(new Error(`Radio button with name '${radioSelector}' and value '${value}' not found.`)); } }); }; function AllEventClick(inputElm) { const events = ['mousedown', 'mouseup', 'click']; events.forEach(eventType => { const event = new MouseEvent(eventType, { view: window, bubbles: true, cancelable: true }); inputElm.dispatchEvent(event); }); } const waitForElement = (selectors, timeout = 5000) => { return new Promise((resolve, reject) => { const interval = 100; let elapsedTime = 0; const checkExistence = () => { for (const selector of selectors) { const element = document.querySelector(selector); if (element) { resolve(element); return; } } elapsedTime += interval; if (elapsedTime >= timeout) { reject(new Error(`None of the elements with selectors "${selectors.join(', ')}" were found within the timeout`)); } else { setTimeout(checkExistence, interval); } }; checkExistence(); }); }; const toggleCheckbox = (checkboxSelector, checked) => { return new Promise((resolve, reject) => { const checkbox = document.querySelector(checkboxSelector); if (checkbox) { checkbox.checked = checked; let event = new Event('change', { bubbles: true, composed: true }); checkbox.dispatchEvent(event); resolve(`Checkbox with selector '${checkboxSelector}' set to ${checked} and event dispatched.`); } else { reject(new Error(`Checkbox with selector '${checkboxSelector}' not found.`)); } }); }; async function getFormatPhone($INPUT, $STRICT) { $STRICT = $STRICT || false; // 市外局番のグループ定義 // データは http://www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/number_shitei.html より入手後、整形 var group = { 5: { "01267": 1, "01372": 1, "01374": 1, "01377": 1, "01392": 1, "01397": 1, "01398": 1, "01456": 1, "01457": 1, "01466": 1, "01547": 1, "01558": 1, "01564": 1, "01586": 1, "01587": 1, "01632": 1, "01634": 1, "01635": 1, "01648": 1, "01654": 1, "01655": 1, "01656": 1, "01658": 1, "04992": 1, "04994": 1, "04996": 1, "04998": 1, "05769": 1, "05979": 1, "07468": 1, "08387": 1, "08388": 1, "08396": 1, "08477": 1, "08512": 1, "08514": 1, "09496": 1, "09802": 1, "09912": 1, "09913": 1, "09969": 1, }, 4: { "0123": 2, "0124": 2, "0125": 2, "0126": 2, "0133": 2, "0134": 2, "0135": 2, "0136": 2, "0137": 2, "0138": 2, "0139": 2, "0142": 2, "0143": 2, "0144": 2, "0145": 2, "0146": 2, "0152": 2, "0153": 2, "0154": 2, "0155": 2, "0156": 2, "0157": 2, "0158": 2, "0162": 2, "0163": 2, "0164": 2, "0165": 2, "0166": 2, "0167": 2, "0172": 2, "0173": 2, "0174": 2, "0175": 2, "0176": 2, "0178": 2, "0179": 2, "0182": 2, "0183": 2, "0184": 2, "0185": 2, "0186": 2, "0187": 2, "0191": 2, "0192": 2, "0193": 2, "0194": 2, "0195": 2, "0197": 2, "0198": 2, "0220": 2, "0223": 2, "0224": 2, "0225": 2, "0226": 2, "0228": 2, "0229": 2, "0233": 2, "0234": 2, "0235": 2, "0237": 2, "0238": 2, "0240": 2, "0241": 2, "0242": 2, "0243": 2, "0244": 2, "0246": 2, "0247": 2, "0248": 2, "0250": 2, "0254": 2, "0255": 2, "0256": 2, "0257": 2, "0258": 2, "0259": 2, "0260": 2, "0261": 2, "0263": 2, "0264": 2, "0265": 2, "0266": 2, "0267": 2, "0268": 2, "0269": 2, "0270": 2, "0274": 2, "0276": 2, "0277": 2, "0278": 2, "0279": 2, "0280": 2, "0282": 2, "0283": 2, "0284": 2, "0285": 2, "0287": 2, "0288": 2, "0289": 2, "0291": 2, "0293": 2, "0294": 2, "0295": 2, "0296": 2, "0297": 2, "0299": 2, "0422": 2, "0428": 2, "0436": 2, "0438": 2, "0439": 2, "0460": 2, "0463": 2, "0465": 2, "0466": 2, "0467": 2, "0470": 2, "0475": 2, "0476": 2, "0478": 2, "0479": 2, "0480": 2, "0493": 2, "0494": 2, "0495": 2, "0531": 2, "0532": 2, "0533": 2, "0536": 2, "0537": 2, "0538": 2, "0539": 2, "0544": 2, "0545": 2, "0547": 2, "0548": 2, "0550": 2, "0551": 2, "0553": 2, "0554": 2, "0555": 2, "0556": 2, "0557": 2, "0558": 2, "0561": 2, "0562": 2, "0563": 2, "0564": 2, "0565": 2, "0566": 2, "0567": 2, "0568": 2, "0569": 2, "0572": 2, "0573": 2, "0574": 2, "0575": 2, "0576": 2, "0577": 2, "0578": 2, "0581": 2, "0584": 2, "0585": 2, "0586": 2, "0587": 2, "0594": 2, "0595": 2, "0596": 2, "0597": 2, "0598": 2, "0599": 2, "0721": 2, "0725": 2, "0735": 2, "0736": 2, "0737": 2, "0738": 2, "0739": 2, "0740": 2, "0742": 2, "0743": 2, "0744": 2, "0745": 2, "0746": 2, "0747": 2, "0748": 2, "0749": 2, "0761": 2, "0763": 2, "0765": 2, "0766": 2, "0767": 2, "0768": 2, "0770": 2, "0771": 2, "0772": 2, "0773": 2, "0774": 2, "0776": 2, "0778": 2, "0779": 2, "0790": 2, "0791": 2, "0794": 2, "0795": 2, "0796": 2, "0797": 2, "0798": 2, "0799": 2, "0820": 2, "0823": 2, "0824": 2, "0826": 2, "0827": 2, "0829": 2, "0833": 2, "0834": 2, "0835": 2, "0836": 2, "0837": 2, "0838": 2, "0845": 2, "0846": 2, "0847": 2, "0848": 2, "0852": 2, "0853": 2, "0854": 2, "0855": 2, "0856": 2, "0857": 2, "0858": 2, "0859": 2, "0863": 2, "0865": 2, "0866": 2, "0867": 2, "0868": 2, "0869": 2, "0875": 2, "0877": 2, "0879": 2, "0880": 2, "0883": 2, "0884": 2, "0885": 2, "0887": 2, "0889": 2, "0892": 2, "0893": 2, "0894": 2, "0895": 2, "0896": 2, "0897": 2, "0898": 2, "0920": 2, "0930": 2, "0940": 2, "0942": 2, "0943": 2, "0944": 2, "0946": 2, "0947": 2, "0948": 2, "0949": 2, "0950": 2, "0952": 2, "0954": 2, "0955": 2, "0956": 2, "0957": 2, "0959": 2, "0964": 2, "0965": 2, "0966": 2, "0967": 2, "0968": 2, "0969": 2, "0972": 2, "0973": 2, "0974": 2, "0977": 2, "0978": 2, "0979": 2, "0980": 2, "0982": 2, "0983": 2, "0984": 2, "0985": 2, "0986": 2, "0987": 2, "0993": 2, "0994": 2, "0995": 2, "0996": 2, "0997": 2, "0180": 3, "0570": 3, "0800": 3, "0990": 3, "0120": 3, }, 3: { "011": 3, "015": 3, "017": 3, "018": 3, "019": 3, "022": 3, "023": 3, "024": 3, "025": 3, "026": 3, "027": 3, "028": 3, "029": 3, "042": 3, "043": 3, "044": 3, "045": 3, "046": 3, "047": 3, "048": 3, "049": 3, "052": 3, "053": 3, "054": 3, "055": 3, "058": 3, "059": 3, "072": 3, "073": 3, "075": 3, "076": 3, "077": 3, "078": 3, "079": 3, "082": 3, "083": 3, "084": 3, "086": 3, "087": 3, "088": 3, "089": 3, "092": 3, "093": 3, "095": 3, "096": 3, "097": 3, "098": 3, "099": 3, "050": 4, "020": $STRICT ? 3 : 4, "070": $STRICT ? 3 : 4, "080": $STRICT ? 3 : 4, "090": $STRICT ? 3 : 4, "060": $STRICT ? 3 : 4, }, 2: { "03": 4, "04": 4, "06": 4, } }; // 市外局番の桁数を取得して降順に並べ替える var code = []; for (num in group) { code.push(num * 1); } code.sort(function ($a, $b) { return ($b - $a); }); // 入力文字から数字以外を削除してnumber変数に格納する var number = String($INPUT).replace(/[0-9]/g, function ($s) { return String.fromCharCode($s.charCodeAt(0) - 65248); }).replace(/\D/g, ""); // 電話番号が10~11桁じゃなかったらfalseを返して終了する if (number.length < 10 || number.length > 11) { return false; } // 市外局番がどのグループに属するか確認していく for (var i = 0, n = code.length; i < n; i++) { var leng = code[i]; var area = number.substring(0, leng); var city = group[leng][area]; // 一致する市外局番を見付けたら整形して整形後の電話番号を返す if (city) { var first = area; var middle = number.substring(first.length, first.length + city); var last = number.substring(first.length + city, number.length); return [first, middle, last] /*return area + "-" + number.substring(leng, leng+city) + (number.substring(leng + city) !== "" ? "-" + number.substring(leng + city) : "");*/ } } }; async function bindForm(obj) { console.log("bindForm", obj) try { await fillInput('#txtName1', obj.LastName) await fillInput('#txtName2', obj.FirstName) await fillInput('#txtKana1', obj.LastNameKana) await fillInput('#txtKana2', obj.FirstNameKana) await fillInput('#txtZip1', obj.Zip.replace("-", "").slice(0, 3)) await fillInput('#txtZip2', obj.Zip.replace("-", "").slice(3)) // q.$('select#drpPrefecture').val(obj.State); // Change selbytxt later await chooseSelectBox('select#drpPrefecture', obj.Prefecture, { useInnerText: true }) await fillInput('input#txtAddress', obj.City) await fillInput('input#txtAddress1', obj.Street1) await fillInput('input#txtAddress2', obj.Street2) await fillInput('input#txtTel1', obj.Tel.replace(/-/g, "").slice(0, 2)) await fillInput('input#txtTel2', obj.Tel.replace(/-/g, "").slice(2, 6)) await fillInput('input#txtTel3', obj.Tel.replace(/-/g, "").slice(6)) await fillInput('input#txtMail', obj.Email) await fillInput('input#txtMail2', obj.Email) await fillInput('input#txtPassword', obj.Password) if (obj.Year && obj.Month && obj.Day) { await chooseSelectBox('#drpBirthDayYear', obj.Year) await chooseSelectBox('#drpBirthDayMonth', Number(obj.Month)) await chooseSelectBox('#drpBirthDayDate', Number(obj.Day)) } if (obj.Gender == "male" || obj.Gender == "男性") { document.querySelector('#rdoMan').click() } else { document.querySelector('#rdoWoman').click() } await toggleCheckbox('#chkAgree', true) await new Promise(resolve => setTimeout(resolve, 1500)); const errorElem = Array.from(document.querySelectorAll('.error_msg_v')) .filter(el => el.innerText.trim() !== ''); console.log(errorElem) if (errorElem.length == 0) { var submit = function () { if (document.querySelector('#btnNext')) { document.querySelector('#btnNext').click() } else { document.querySelector('[onclick*="next()"]').click() } }; setTimeout(submit, 1000); } else { hideLoadingScreen() console.log("error", errorElem) } } catch (error) { console.log(error) } } function showLoadingScreen() { // Create loading screen container const loadingScreen = document.createElement('div'); loadingScreen.id = 'dynamicLoadingScreen'; loadingScreen.style.position = 'fixed'; loadingScreen.style.top = '0'; loadingScreen.style.left = '0'; loadingScreen.style.width = '100%'; loadingScreen.style.height = '100%'; loadingScreen.style.backgroundColor = 'rgba(255, 255, 255, 0.9)'; loadingScreen.style.display = 'flex'; loadingScreen.style.justifyContent = 'center'; loadingScreen.style.alignItems = 'center'; loadingScreen.style.flexDirection = 'column'; loadingScreen.style.color = '#333'; loadingScreen.style.zIndex = '9999999999'; loadingScreen.style.backdropFilter = 'blur(10px)'; loadingScreen.style.webkitBackdropFilter = 'blur(10px)'; // Create spinner const spinner = document.createElement('div'); spinner.style.border = '16px solid #f3f3f3'; /* Light grey */ spinner.style.borderTop = '16px solid #3498db'; /* Blue */ spinner.style.borderRadius = '50%'; spinner.style.width = '120px'; spinner.style.height = '120px'; spinner.style.animation = 'spin 2s linear infinite'; // Add spinner to loading screen loadingScreen.appendChild(spinner); // Create loading text const loadingText = document.createElement('p'); loadingText.textContent = '処理中です。そのままお待ちください。'; // Add loading text to loading screen loadingScreen.appendChild(loadingText); // Append loading screen to body document.body.appendChild(loadingScreen); // Add spinner animation (injected CSS) const styleSheet = document.createElement('style'); styleSheet.innerHTML = ` @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } `; document.head.appendChild(styleSheet); } // Hide the loading screen function hideLoadingScreen() { const loadingScreen = document.getElementById('dynamicLoadingScreen'); if (loadingScreen) { loadingScreen.style.display = 'none'; // Hide the loading screen } } }())