Ubuntu

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ var SecuPress={swal2Defaults:{confirmButtonText:SecuPressi18nScanner.confirmText,cancelButtonText:SecuPressi18nScanner.cancelText,type:"warning",allowOutsideClick:!0,customClass:"wpmedia-swal2 secupress-swal2"},swal2ConfirmDefaults:{showCancelButton:!0,closeOnConfirm:!1}};SecuPressi18nScanner.step=Number(SecuPressi18nScanner.step),jQuery(document).ready(function(a){function b(a){wp.a11y&&wp.a11y.speak&&void 0!==a&&a&&wp.a11y.speak(a)}function c(){var b;l&&window.Chart&&SecuPressi18nChart&&(a.isEmptyObject(k)?(b=[{value:SecuPressi18nChart.good.value,color:"#26B3A9",highlight:"#2BCDC1",label:SecuPressi18nChart.good.text,status:"good"},{value:SecuPressi18nChart.bad.value,color:"#CB234F",highlight:"#F2295E",label:SecuPressi18nChart.bad.text,status:"bad"},{value:SecuPressi18nChart.warning.value,color:"#F7AB13",highlight:"#F1C40F",label:SecuPressi18nChart.warning.text,status:"warning"}],SecuPressi18nChart.notscannedyet.value&&b.push({value:SecuPressi18nChart.notscannedyet.value,color:"#5A626F",highlight:"#888888",label:SecuPressi18nChart.notscannedyet.text,status:"notscannedyet"}),a.each(l,function(a,c){var d=c.id;k[d]=new Chart(c.getContext("2d")).Doughnut(b,{animationEasing:"easeInOutQuart",showTooltips:!0,segmentShowStroke:!1,percentageInnerCutout:93,tooltipEvents:[]})})):a.each(l,function(a,b){var c=b.id;k[c].segments[0].value=SecuPressi18nChart.good.value,k[c].segments[1].value=SecuPressi18nChart.bad.value,k[c].segments[2].value=SecuPressi18nChart.warning.value,void 0!==k[c].segments[3]&&(k[c].segments[3].value=SecuPressi18nChart.notscannedyet.value),k[c].update()}),SecuPressi18nChart.notscannedyet.value||a(".secupress-chart-legend .status-notscannedyet").remove())}function d(b){return b.each(function(){var b=a(this),c=this.nodeName.toLowerCase();"button"===c||"input"===c?b.attr({disabled:"disabled","aria-disabled":"true"}):b.addClass("disabled").attr("aria-disabled","true")}),b}function e(b){return b.each(function(){var b=a(this),c=this.nodeName.toLowerCase();"button"===c||"input"===c?b.removeAttr("disabled aria-disabled"):b.removeClass("disabled").removeAttr("aria-disabled")}),b}function f(a){var b=a.get(0).nodeName.toLowerCase();if("button"===b||"input"===b)return a.prop("disabled");a.hasClass("disabled")}function g(){var b=a(".secupress-button-manual-fixit");b.find(".secupress-icon-shield").addClass("secupress-icon-check").removeClass("secupress-icon-shield"),a(".secupress-mf-content.fixing").removeClass("fixing"),b=b.add(".secupress-button-ignoreit"),e(b)}function h(b){l&&window.Chart&&(a(".secupress-chart-container .letter").replaceWith(b.letter),a(".secupress-score-text").html(b.text),a(".secupress-scan-infos .secupress-score").html(b.subtext),a("#wp-admin-bar-secupress").find(".letter").text(b.grade),a("#toplevel_page_"+SecuPressi18nScanner.pluginSlug+"_scanners").find(".update-count").text(b.bad).parent().attr("class",function(a,c){return c.replace(/count-\d+/,"count-"+b.bad)}),SecuPressi18nChart&&(SecuPressi18nChart.good.value=b.good,SecuPressi18nChart.bad.value=b.bad,SecuPressi18nChart.warning.value=b.warning,SecuPressi18nChart.notscannedyet.value=b.notscannedyet,c()))}function i(b){var c;1===SecuPressi18nScanner.step&&b?window.location.href.match(/(\?|&)step=1($|&)/)?window.location=window.location.href:window.location=window.location.href.replace("&step=0","")+"&step=1":2===SecuPressi18nScanner.step?window.location=window.location.href.replace(/(\?|&)step=2($|&)/,"$1step=3$2"):3===SecuPressi18nScanner.step&&(c=a(".secupress-manual-fix").not(".hide-if-js"),c.find(".secupress-button-manual-scanit").find(".secupress-icon-shield").addClass("secupress-icon-check").removeClass("secupress-icon-shield"),g(),c.find(".secupress-button-ignoreit").first().trigger("next.secupress"))}function j(b,c){var d;if("boolean"!=typeof c&&(c=!1),!SecuPressi18nScanner.i18nNonce)return void i(c);d={action:"secupress-get-scan-counters",_wpnonce:SecuPressi18nScanner.i18nNonce},a.getJSON(ajaxurl,d).done(function(c){a.isPlainObject(c)&&c.success&&c.data&&(c.data.isBulk=b,h(c.data))}).always(function(){i(c)})}var k={},l=[];document.getElementById("status_chart")&&l.push(document.getElementById("status_chart")),document.getElementById("status_chart_mini")&&l.push(document.getElementById("status_chart_mini")),a(".secupress-score").find(".letter").hasClass("lA")&&"ok"!==function(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d'+SecuPressi18nScanner.error+""),void f.remove())}).fail(function(){d.replaceWith(''+SecuPressi18nScanner.error+""),f.remove()})}c(".secupress-centralize-blog-options").on("click.secupress keyup",function(a){var b,d,f,g;return!("keyup"===a.type&&!secupressIsSpaceOrEnterKey(a))&&(b=c(this),d=b.attr("href").replace("admin-post.php","admin-ajax.php"),f=c(''),g=c('0%'),!b.hasClass("running")&&(b.addClass("running").parent().append(f).append(g).find(".secupress-error-notif").remove(),a.preventDefault(),void e(d,b,f,g)))})}(window,document,a),function(a,b,c,d){var e=c.propHooks.checked;c.propHooks.checked={set:function(a,b,d){var f;return f=void 0===e?a[d]=b:e(a,b,d),c(a).trigger("change.secupress"),f}},c(".secupress-sg-content .secupress-row-check").on("click",function(a){var b=c(this).closest(".secupress-scans-group"),d=0===b.find(".secupress-row-check").filter(":visible:enabled").not(":checked").length;b.find(".secupress-toggle-check").prop("checked",d)}).on("change.secupress",function(a){var b,d,e=c(this);if(e.is(":visible:enabled")){if(b=c(".secupress-button-autofix"),e.is(":checked"))return void(b.first().hasClass("hidden")&&(b.next().addClass("hidden"),b.removeClass("hidden")));d=c(".secupress-sg-content .secupress-row-check").filter(":visible:enabled:checked"),d.length||b.first().hasClass("hidden")||(b.addClass("hidden"),b.next().removeClass("hidden"))}}).first().trigger("change.secupress"),c(".secupress-sg-header .secupress-toggle-check").on("click.wp-toggle-checkboxes",function(a){var b=c(this),d=b.closest(".secupress-scans-group"),e=b.prop("checked"),f=a.shiftKey||b.data("wp-toggle");d.children(".secupress-sg-header").find(".secupress-toggle-check").prop("checked",function(){var a=c(this);return!a.is(":hidden,:disabled")&&(f?!a.prop("checked"):!!e)}),d.children(".secupress-sg-content").find(".secupress-row-check").prop("checked",function(){return!f&&!!e})})}(window,document,a),l&&window.Chart&&(a(".secupress-scanners-header").hasClass("secupress-not-scanned-yet")||c()),function(a,b,c,d){var e=c(".secupress-scan-header-main .secupress-tabs-controls-list a"),f=e.filter('[href="#secupress-scan"]'),g=c(".secupress-scanners-header"),h=c(".secupress-heading").find(".secupress-last-scan-result");f.on("click.secupress",function(){g.removeClass("secupress-tab-selected"),h.off("click.secupress")}),e.not('[href="#secupress-scan"]').on("click.secupress",function(){g.addClass("secupress-tab-selected"),h.on("click.secupress",function(){f.trigger("click.secupress")})})}(window,document,a),function(a,b,c,d){var e=c(".secupress-start-one-click-scan .secupress-button-scan");e.css("width",e.outerWidth()+5)}(window,document,jQuery),function(a,h,i,k){function l(a){var d,e=i(".secupress-introduce-first-scan"),f=i(".secupress-scanners-header"),g=a.closest(".secupress-not-scanned-yet").length,h=i(".secupress-progressbar-val"),j=i(".secupress-progress-val-txt");f.addClass("secupress-scanning"),i(".secupress-scanned-total").text(D.total),d=setInterval(function(){var a=Object.keys(D.doingScan).length,k=D.total-a,l=Math.max(k/D.total*100,2);l=Math.round(Math.min(l,100)),h.css("width",l+"%"),j.text(l+" %"),l>=100&&(b(SecuPressi18nScanner.a11y.scanEnded),clearInterval(d),g?e.slideUp(200,function(){i(".secupress-open-moreinfo").removeClass("secupress-activated"),i("#secupress-more-info").removeClass("secupress-open").hide(),i(".secupress-scan-header-main").css("display","flex").hide().slideDown(200,function(){i(".secupress-scanners-header.secupress-not-scanned-yet").removeClass("secupress-not-scanned-yet")}),c()}):f.removeClass("secupress-scanning"))},100)}function m(){var a=i(".secupress-step-content-header, #secupress-tests, .secupress-step-content-footer"),c=i("#secupress-spinner");a.spHide(),c.spFadeIn().removeClass("hidden"),b(SecuPressi18nScanner.a11y.bulkFixStart)}function n(a){var b=i("#secupress-latest").find(".secupress-reports-list");b.children(".secupress-empty").remove(),5===b.children("li").length?b.children("li:last").slideUp(250,function(){i(this).remove(),b.prepend(a).find("li.hidden").slideDown(250)}):b.prepend(a).find("li.hidden").slideDown(250)}function o(a){var b=a.match(/[&?]test=([^&]+)(?:$|&)/);return!!b&&b[1]}function p(a){return!(!a.success||!i.isPlainObject(a.data))&&!!(a.data.status&&a.data.class&&a.data.message)}function q(){return i.isEmptyObject(D.doingScan)&&i.isEmptyObject(D.doingFix)&&!D.delayedFixes.length}function r(a,b){a.find(".secupress-item-status .secupress-label").text(b)}function s(a){return 1===SecuPressi18nScanner.step&&(r(a,SecuPressi18nScanner.error),a.addClass("status-error"),!1)}function t(a,b,c,d){var e=parseInt(SecuPressi18nScanner.offset);if(-1===E&&(E=parseInt(-e)),E+=e,!a)return s(b);D.doingScan[a]||(D.doingScan[a]=1,b.addClass("scanning").removeClass("status-error"),setTimeout(function(){i.getJSON(c.replace("admin-post.php","admin-ajax.php")).done(function(c){i(".secupress-scanned-current").html(a.replace(/_/g," ")+"
"+i(".secupress-item-all").index(b))}).fail(function(){s(b)}).always(function(){delete D.doingScan[a],q()&&i("body").trigger("allScanDone.secupress",[{isBulk:d}])})},E))}function u(a){return a.hasClass("status-bad")&&!a.hasClass("not-fixable")}function v(a,b,c){a&&(D.doingFix[a]||u(b)&&(D.doingFix[a]=1,b.addClass("fixing").removeClass("status-error"),i.getJSON(c.replace("admin-post.php","admin-ajax.php")).done(function(b){delete D.doingFix[a],p(b)&&i("body").trigger("fixDone.secupress",[{test:a,href:c,data:b.data}])}).fail(function(){delete D.doingFix[a]}).always(function(){i.isEmptyObject(D.doingFix)&&!D.delayedFixes.length&&i("body").trigger("allFixDone.secupress")})))}function w(a){return i.isEmptyObject(D.doingFix)?(a.filter(".delayed-fix").each(function(){D.delayedFixes.push(this)}),a.not(".delayed-fix")):a}function x(){var a=D.delayedFixes.shift();i(a).trigger("bulkfix.secupress")}function y(){var a=i(".secupress-sg-content .secupress-row-check").filter(":checked").siblings(".secupress-fixit");a=w(a),a.length?a.trigger("bulkfix.secupress"):x()}function z(a){var c;return a=a.addClass("status-error").find(".secupress-ic-fix-actions"),c=a.next(".secupress-response-notice"),c.length&&secupressNotices.remove(c),c=secupressNotices.create({type:"bad",message:SecuPressi18nScanner.error}),a.after(c),b(SecuPressi18nScanner.error),g(),!1}function A(a,b){var c;return p(a)?(c=b.children("form.secupress-item-content"),a.data.form_contents=a.data.form_contents?a.data.form_contents:"",a.data.form_contents||c.find(".secupress-button-manual-fixit").remove(),c.children(".secupress-ic-desc").html(a.data.message),c.children(".secupress-ic-fix-actions").html(a.data.form_contents),!0):z(b)}function B(a){var b,c=i("#secupress-mf-content-"+a),d=c.children("form.secupress-item-content").serializeArray();if(!d)return z(c);b=c.removeClass("status-error").find(".secupress-response-notice"),b.length&&secupressNotices.remove(b),c.addClass("fixing").find(".secupress-button-manual-fixit .secupress-icon-check").addClass("secupress-icon-shield").removeClass("secupress-icon-check"),i.post(ajaxurl,d,null,"json").done(function(b){A(b,c)?i("body").trigger("manualFixDone.secupress",[{test:a,data:b.data}]):z(c)}).fail(function(){z(c)})}function C(a,b,c){a&&(b.addClass("scanning").find(".secupress-button-manual-scanit .secupress-icon-check").addClass("secupress-icon-shield").removeClass("secupress-icon-check"),i.getJSON(c.replace("admin-post.php","admin-ajax.php")).done(function(b){p(b)&&i("body").trigger("scanDone.secupress",[{test:a,href:c,isBulk:!1,data:b.data}])}).always(function(){b.removeClass("scanning"),i("body").trigger("allScanDone.secupress",[{isBulk:!1}])}))}var D={doingScan:{},doingFix:{},delayedFixes:[],total:0};!function(){var a=i("#secupress-tests").find(".secupress-item-all").length;D.total=a}();var E=-1;i("body").on("scanDone.secupress",function(a,b){i("#"+b.test);D.delayedFixes.length&&x()}),i("body").on("allScanDone.secupress",function(a,b){var c,d=i(".secupress-button-scan").last();d.length&&f(d)?(c={action:"secupress-update-oneclick-scan-date",_wpnonce:d.data("nonce")},i.getJSON(ajaxurl,c).done(function(a){i.isPlainObject(a)&&a.success&&a.data&&n(a.data)}).always(function(){e(i(".secupress-button-scan")),j(b.isBulk,!0)})):j(b.isBulk)}),i("body").on("fixDone.secupress",function(a,b){var c=i("#"+b.test),d=c.data("scan-url");t(b.test,c,d,!0)}),i("body").on("allFixDone.secupress",function(a){}),i("body").on("manualFixDone.secupress",function(a,b){var c=i("#secupress-mf-content-"+b.test),d=c.data("scan-url");t(b.test,c,d,!1)}),i("body").on("bulkscan.secupress",".secupress-scanit",function(a){var b,c,d,e;a.preventDefault(),b=i(this),c=b.attr("href"),d=o(c),e=b.closest(".secupress-item-"+d),t(d,e,c,!0)}),i("body").on("click.secupress scan.secupress keyup",".secupress-button-manual-scanit",function(a){var b,c,e,g;if("keyup"===a.type&&!secupressIsSpaceOrEnterKey(a))return!1;b=i(this),f(b)||(a.preventDefault(),c=b.attr("href"),e=o(c),g=i("#secupress-mf-content-"+e),d(b),C(e,g,c))}),i("body").on("click.secupress bulkscan.secupress keyup",".secupress-button-scan",function(b){var c;return!("keyup"===b.type&&!secupressIsSpaceOrEnterKey(b))&&(4===SecuPressi18nScanner.step?(a.location=SecuPressi18nScanner.firstScanURL,!1):(c=i(this),void(f(c)||(b.preventDefault(),d(i(".secupress-button-scan")),i("#secupress-button-scan-speed").hide(),i(".secupress-scanit").trigger("bulkscan.secupress"),l(c)))))}),i("body").on("bulkfix.secupress",".secupress-fixit",function(a){var b,c,d,e;a.preventDefault(),b=i(this),c=b.attr("href"),d=o(c),e=b.closest(".secupress-item-"+d),v(d,e,c)}),i("body").on("click.secupress bulkfix.secupress keyup",".secupress-button-autofix",function(a){var b;if("keyup"===a.type&&!secupressIsSpaceOrEnterKey(a))return!1;b=i(this),f(b)||(a.preventDefault(),d(i(".secupress-button-autofix")),y(),m())}),i("body").on("submit.secupress manualfix.secupress","form.secupress-item-content",function(a){var b,c=i(this),e=c.find(".secupress-button-manual-fixit");a.preventDefault(),f(e)||(d(i(".secupress-button-manual-fixit, .secupress-button-ignoreit")),b=c.parent(".secupress-mf-content").attr("id").replace("secupress-mf-content-",""),B(b))}),i("body").on("click.secupress next.secupress keyup",".secupress-button-ignoreit",function(b){var c,d,e,g;return!("keyup"===b.type&&!secupressIsSpaceOrEnterKey(b))&&(c=i(this),!f(c)&&(d=i("."+c.attr("data-parent")),e=d.next(),e.length?(b.preventDefault(),d.addClass("hide-if-js"),e.removeClass("hide-if-js"),g=i(".step3-advanced-text").first().text(),g=Number(g)+1,void i(".step3-advanced-text").text(g)):(a.location=this.href,!1)))}),i(".secupress-item-all.autoscan .secupress-scanit").trigger("bulkscan.secupress"),SecuPressi18nScanner.firstOneClickScan&&q()&&i(".secupress-button-scan").last().trigger("bulkscan.secupress")}(window,document,a)});