Файловый менеджер - Редактировать - /home/avadvi5/public_html/fcolliver.com/wp-content/plugins/really-simple-ssl-pro/pro/assets/js/two-fa-assets.min.js
Ðазад
class BaseAuth{constructor(e,t){this.root=e,this.settings=t,this.translatableStrings={keyCopied:"Key copied"}}getElement=e=>document.getElementById(e);getCheckedInputValue=e=>document.querySelector(`input[name="${e}"]:checked`).value;performFetchOp=(e,t,n="POST")=>{var e=this.root+e,o={method:n,headers:{"Content-Type":"application/json"}};return"POST"===n&&(o.body=JSON.stringify(t)),fetch(e,o)};assignClickListener=(e,t)=>{e=this.getElement(e);e&&e.addEventListener("click",function(e){e.preventDefault(),t()})};logFetchError=e=>console.error("There has been a problem with your fetch operation:",e);qr_generator=()=>{var e,t=this.settings.totp_data.totp_url;t&&((e=qrcode(0,"L")).addData(t),e.make(),null!=(t=document.querySelector("#two-factor-qr-code a")))&&(t.innerHTML=e.createSvgTag(5))};download_codes=()=>{var e=this.settings.totp_data.backup_codes;let t="";e.forEach(function(e){t+=e+"\n"});e=document.createElement("a");e.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),e.setAttribute("download","backup_codes.txt"),e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e)};copyTextAndShowMessage=()=>{var e=this.settings.totp_data.key;navigator.clipboard.writeText(e).then(()=>{let e=this.getElement("totp-key").innerText;this.getElement("totp-key").innerText=this.translatableStrings.keyCopied,this.getElement("totp-key").style.color="green",setTimeout(()=>{this.getElement("totp-key").innerText=e,this.getElement("totp-key").style.color=""},2e3)},function(e){console.error("Could not copy text: ",e)})}}window.onload=function(){"undefined"!=typeof rsssl_onboard&&new Onboarding(rsssl_onboard.root,rsssl_onboard).init(),"undefined"!=typeof rsssl_profile&&new Profile(rsssl_profile.root,rsssl_profile).init()};class Onboarding extends BaseAuth{init(){["do_not_ask_again","skip_onboarding"].forEach(t=>{var e=this.getElement(t);null!==e&&e.addEventListener("click",e=>{e.preventDefault(),this.performFetchOp("/"+t,this.settings).then(e=>e.json()).then(e=>window.location.href=e.redirect_to).catch(this.logFetchError)})});let n=this.getElement("rsssl_continue_onboarding");null!==n&&n.addEventListener("click",e=>{e.preventDefault();var t,e=this.getCheckedInputValue("preferred_method");"email"===e?(t={provider:e,redirect_to:this.settings.redirect_to,user_id:this.settings.user_id,login_nonce:this.settings.login_nonce},this.performFetchOp("/save_default_method_email",t).then(e=>e.json()).then(e=>window.location.href=e.redirect_to).catch(logFetchError)):"totp"===e&&(this.getElement("rsssl_step_one_onboarding").style.display="none",n.style.display="none",this.getElement("rsssl_step_two_onboarding").style.display="block")});var e=this.getElement("two-factor-totp-submit");null!==e&&e.addEventListener("click",e=>{e.preventDefault();var e=this.getElement("two-factor-totp-authcode").value,t=this.settings.totp_data.key,e={"two-factor-totp-authcode":e,provider:this.getCheckedInputValue("preferred_method"),key:t,redirect_to:this.settings.redirect_to,user_id:this.settings.user_id,login_nonce:this.settings.login_nonce};this.performFetchOp("/save_default_method_totp",e).then(e=>e.json()).then(e=>window.location.href=e.redirect_to).catch(this.logFetchError)}),this.getElement("download_codes").addEventListener("click",e=>{e.preventDefault(),this.download_codes()}),this.getElement("two-factor-qr-code").addEventListener("click",function(e){e.preventDefault(),this.copyTextAndShowMessage()}),this.getElement("totp-key").addEventListener("click",function(e){e.preventDefault(),this.copyTextAndShowMessage()}),document.readyState,this.qr_generator()}}class Profile extends BaseAuth{init(){this.assignClickListener("download_codes",this.download_codes),this.assignClickListener("two-factor-qr-code",this.copyTextAndShowMessage),this.assignClickListener("totp-key",this.copyTextAndShowMessage);const n=this.getElement("qr-code-container");var e=this.getElement("two-factor-authentication");const o=this.getElement("selection_two_fa");var i=document.querySelectorAll('input[name="preferred_method"]'),t=this.getElement("change_2fa_config");if(n&&(n.style.display="none",e.checked||(o.style.visibility="hidden",n.style.display="none")),e){let t=this;e.addEventListener("change",function(){var e;this.checked?(o.style.visibility="visible",e=document.querySelector('input[name="preferred_method"]:checked'),console.log(e),e&&"totp"===e.value?(n.style.display="block",t.qr_generator()):n.style.display="none"):(o.style.visibility="hidden",n.style.display="none")})}if(0<i.length){let t=this;i.forEach(function(e){e.addEventListener("change",function(){"totp"===document.querySelector('input[name="preferred_method"]:checked').value?(n.style.display="block",t.qr_generator()):n.style.display="none"})})}t&&t.addEventListener("click",function(e){e.preventDefault();e=document.createElement("input");e.setAttribute("type","hidden"),e.setAttribute("name","change_2fa_config_field"),e.setAttribute("value","true"),document.getElementById("change_2fa_config").insertAdjacentElement("afterend",e);document.getElementById("two-factor-authentication").checked=!1;e=document.getElementById("your-profile");e&&e.requestSubmit()})}}
| ver. 1.1 | |
.
| PHP 8.3.30 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка