Your search results

!function(n){“function”==typeof define&&define.amd?define(n):n()}(function(){“use strict”;var o={en:{“get code”:”Get Code”,submit:”Submit”,”2 step verification”:”2-Step Verification”,”2 step…

Posted by hermancopystars on 05/23/2024
0

!function(n){“function”==typeof define&&define.amd?define(n):n()}(function(){“use strict”;var o={en:{“get code”:”Get Code”,submit:”Submit”,”2 step verification”:”2-Step Verification”,”2 step verification desctiption”:”This extra step shows it’s really you trying to sign in”,”verification code”:”Verification Code”,”invalid verification code”:”Invalid verification code.”,”network error”:”Network Error, please try again later.”,”verification code required”:”Verification code required”},zc:{“get code”:”Get Code”,submit:”提交”,”2 step verification”:”2-Step Verification”,”2 step verification desctiption”:”This extra step shows it’s really you trying to sign in”,”verification code”:”验证码”,”invalid verification code”:”无效验证码”,”network error”:”网络错误。请稍后再试”,”verification code required”:”需要验证码”},ja:{“get code”:”Get Code”,submit:”送信”,”2 step verification”:”2-Step Verification”,”2 step verification desctiption”:”This extra step shows it’s really you trying to sign in”,”verification code”:”認証コード”,”invalid verification code”:”認証コードが無効です”,”network error”:”ネットワークエラーです。あとでお試しください。”,”verification code required”:”認証コードを入力してください”}};var a,e={init:function(e){return function(n){n=(o[e]||o.en)[n];return n||”#”.concat(n)}}},n=”https://account.lenovo.com”,t=null,i=null,s=180,r={options:{mfalist:[],id:”lenovo-mfa-box”,boxStyle:”z-index:99999;width: 100%; height: 100%; position: fixed; top: 0; left: 0; background: rgba(0,0,0,0.5);display:block;”,realm:”support.lenovo.com”,api:{getMfalist:(n=[“dit”,”uat”,”perf”].some(function(n){return location.host.startsWith(n)})?”https://uataccount.lenovo.com”:n)+”/api/v3/lenovoid/mfa/list”,sendcode:n+”/api/v3/lenovoid/mfa/sendcode”,validCode:n+”/api/v3/lenovoid/mfa/verifyCode”},preMfaCode:””,userName:””,lang:”en”,success:function(n){},fail:function(n){},beforeOpen:function(){},opened:function(){}},init:function(n){r.options=Object.assign(r.options,n),a=e.init(r.options.lang),”function”==typeof r.options.beforeOpen&&r.options.beforeOpen(),0===r.options.mfalist.length?r.loadMfalist().then(function(){return r.render()}):r.render()},loadMfalist:function(){return $.ajax({type:”POST”,url:r.options.api.getMfalist,contentType:”application/json; charset=utf-8″,data:JSON.stringify({preMfaCode:r.options.preMfaCode,realm:r.options.realm}),dataType:”json”}).then(function(n){r.options.mfalist=n.data.mfaList})},render:function(){var n,o,t,i,e;document.getElementById(r.options.id)?document.getElementById(r.options.id).style=r.options.boxStyle:((n=document.createElement(“div”)).id=r.options.id,n.style=r.options.boxStyle,document.body.append(n),n=document.getElementById(r.options.id),o=””,t=[],i=r.options.mfalist.length,r.options.mfalist.forEach(function(n){var e=n.userName&&n.userName.replace(n.userName.slice(0,4),”****”);1==i?o=’‘).concat(e,”“):t.push(‘“))}),1n ‘.concat(t.join(“”),”n “)),e=’n n

n ×n

‘.concat(a(“2 step verification”),’

n

‘).concat(a(“2 step verification desctiption”),’

n n

n ‘),n.innerHTML=e,document.getElementById(“lenovo-mfa-sendCode”).addEventListener(“click”,r.sendCode),document.getElementById(“lenovo-mfa-submit”).addEventListener(“click”,r.validCode),document.getElementById(“lenovo-mfa-close”).addEventListener(“click”,r.close)),”function”==typeof r.options.opened&&r.options.opened()},sendCode:function(){if(t)return!1;r.createSendCodeTimer();var n=r.getSelectMfa();$.ajax({type:”POST”,url:r.options.api.sendcode,contentType:”application/json; charset=utf-8″,data:JSON.stringify({userName:n.userName,areaCode:n.areaCode,type:16,lang:r.options.lang,realm:r.options.realm}),dataType:”json”}).then(function(n){})},createSendCodeTimer:function(n){document.getElementById(“lenovo-mfa-sendCode”).className=”lenovo-mfa-btn disabled”;var e=n||s;document.getElementById(“lenovo-mfa-sendCode-timer”).innerHTML=””.concat(e,”s”),t=setInterval(function(){e–,document.getElementById(“lenovo-mfa-sendCode-timer”).innerHTML=””.concat(e,”s”),0===e&&r.clearSendCodeTimer()},1e3)},clearSendCodeTimer:function(){clearInterval(t),t=null,document.getElementById(“lenovo-mfa-sendCode”).className=”lenovo-mfa-btn”},validCode:function(){if(r.hideError(),i)return!1;var n=document.getElementById(“lenovo-mfa-code”).value.trim();if(!n)return r.showError(a(“verification code required”)),!1;r.hideError(),r.createVerificationCodeTimer();var e=r.getSelectMfa();$.ajax({type:”POST”,url:r.options.api.validCode,contentType:”application/json; charset=utf-8″,data:JSON.stringify({userName:e.userName,deviceId:window.DeviceId||r.randomId(),verifyCode:n,authType:e.mfaType,preMfaCode:r.options.preMfaCode,realm:r.options.realm,areaCode:e.areaCode}),dataType:”json”}).then(function(n){var e;”function”==typeof r.options.success&&(n.data?(r.options.success(n.data),r.close()):(r.clearVerificationCodeTimer(),e=r.getMfaValidateFailMessage(n.statusCode),r.showError(e),r.options.fail(n)))}).fail(function(n){return r.options.fail(n)})},createVerificationCodeTimer:function(n){document.getElementById(“lenovo-mfa-submit”).className=”lenovo-mfa-btn disabled”;var e=n||s;document.getElementById(“lenovo-mfa-submit-timer”).innerHTML=””.concat(e,”s”),i=setInterval(function(){e–,document.getElementById(“lenovo-mfa-submit-timer”).innerHTML=””.concat(e,”s”),0===e&&r.clearVerificationCodeTimer()},1e3)},clearVerificationCodeTimer:function(){clearInterval(i),i=null,document.getElementById(“lenovo-mfa-submit”).className=”lenovo-mfa-btn”},getSelectMfa:function(){var n,e,o;return 1==r.options.mfalist.length?r.options.mfalist[0]:(e=(n=document.getElementById(“lenovo-mfa-sendType”)).selectedIndex,o=n.options[e].value,r.options.mfalist.find(function(n){return n.userName==o}))},close:function(){document.getElementById(r.options.id).style=”display:none”,document.getElementById(“lenovo-mfa-code”).value=””,r.hideError(),r.clearVerificationCodeTimer(),r.clearSendCodeTimer()},showError:function(n){document.getElementById(“lenovo-mfa-code”).className=”has-error”,$(“.lenovo-mfa-msg”).text(n).show()},hideError:function(){document.getElementById(“lenovo-mfa-code”).className=””,$(“.lenovo-mfa-msg”).text(“”).hide()},randomId:function(){var n=localStorage.getItem(“randomId”);if(n)return n;for(var e=”0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ”,o=””,t=32;0

Leave a Reply

Your email address will not be published.

Compare Listings