Current File : /home/n742ef5/.trash/wp-content.3/plugins/security-malware-firewall/js/spbc-admin.min.js
function spbcGetGoogleQrCode(){var e={},c={};return e.security=spbcSettings.ajax_nonce,e.action="spbc_get_google_qr_code",jQuery.ajax({type:"POST",async:!1,url:spbcSettings.ajaxurl,data:e,success:function(e){c=e}}),c}function spbcCheckGoogleCode(){var e={};e.security=spbcSettings.ajax_nonce,e.action="spbc_check_google_code",e.code=jQuery("#spbct-google-qr-code input").val(),jQuery.ajax({type:"POST",async:!1,url:spbcSettings.ajaxurl,data:e,success:function(e){e.success?(jQuery("#spbct-google-qr-code").dialog("close"),document.location.reload()):alert(e.data)}})}function spbcDisableG2fa(e){var c={};c.security=spbcSettings.ajax_nonce,c.action="spbc_disable_google_2fa",c.user_id=jQuery(e).data("user-id"),jQuery.ajax({type:"POST",async:!1,url:spbcSettings.ajaxurl,data:c,success:function(e){e.success?document.location.reload():alert(e.data)}})}function spbcSummaryShowCDNCheckerTable(){event.preventDefault();var e=document.getElementById("spbc_stats_cdn_checker_table");void 0!==e&&("block"===e.style.display?e.style.display="none":e.style.display="block")}jQuery(document).ready(function(){jQuery(".spbc_update_notice").on("click","button",function(){spbc_setCookie("spbc_update_banner_closed",1,2592e3)}),jQuery(document).on("click","#spbc-g2fa-enable",function(e){e.preventDefault();e=spbcGetGoogleQrCode();e.success?(jQuery("#spbct-google-qr-code-img").html(e.data.img+"<p>"+e.data.code+"</p>"),jQuery("#spbct-google-qr-code input").val(""),jQuery("#spbct-google-qr-code").dialog({modal:!0,title:"Google authenticator activation",buttons:{Cancel:function(){jQuery(this).dialog("close")},Ok:function(){spbcCheckGoogleCode()}},draggable:!1,resizable:!1})):alert(spbcGetGoogleQrCode.data)}),jQuery(document).on("click","#spbc-g2fa-disable",function(e){e.preventDefault(),confirm("Are you sure?")&&spbcDisableG2fa(this)});function e(e,c,t){setTimeout(function(){null!==e&&(jQuery(".spbc-admin_bar--user_counter").html(e.count),e.count<=3?(jQuery("#wp-admin-bar-spbc_admin_bar__online_admins").show(),jQuery(".spbc-admin_bar--online_admins").html(e.users.join(", "))):jQuery("#wp-admin-bar-spbc_admin_bar__online_admins").hide()),spbc_sendAJAXRequest(c,t)},15e3)}1==+spbcSettings.admin_bar__admins_online_counter&&e(null,{action:"spbc_get_authorized_admins"},{callback:e}),jQuery("body").on("click",".spbc-notice .notice-dismiss",function(e){e=jQuery(e.target).parent(".notice").attr("id");e&&spbc_sendAJAXRequest({action:"spbc_dismiss_banner",banner_id:e},{callback:null})}),1==+spbcSettings.needToWhitelist&&spbc_sendAJAXRequest({action:"spbc_private_list_add"},{callback:null})});
//# sourceMappingURL=spbc-admin.min.js.map