| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /inetpub/wwwroot/cdc/wp-content/plugins/autoconvert-greeklish-permalinks/admin/js/ |
Upload File : |
function cleanHTML(e,t){function o(e,t){let o=t.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(e)||!o.includes("javascript:")&&!o.includes("data:"))||(!!e.startsWith("on")||void 0)}function n(e){let t=e.attributes;for(let{name:n,value:r}of t)o(n,r)&&e.removeAttribute(n)}let r=(new DOMParser).parseFromString(e,"text/html").body||document.createElement("body");return function(e){let t=e.querySelectorAll("script");for(let e of t)e.remove()}(r),function e(t){let o=t.children;for(let t of o)n(t),e(t)}(r),t?r.childNodes:r.innerHTML}!function(e){e(".select2").select2();var t=new URLSearchParams(window.location.search).get("tab");"generate_permalinks"===t?function(){var t=e("#selectPosts"),o=e("#selectTaxonomies"),n=e("#messageOutput");function r(e,t,...o){"error"===t?n.attr("class","error inline"):"success"===t?n.attr("class","updated inline"):n.attr("class","notice");const r=cleanHTML("<p>"+function(e){var t=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,o){return void 0!==t[o]?t[o]:e})}(e,...o)+"</p>");n.html(r),n.show()}e("#selectAllPosts").click(function(o){o.preventDefault(),e("#selectPosts > option").prop("selected","selected"),t.trigger("change")}),e("#selectAllTaxonomies").click(function(t){t.preventDefault(),e("#selectTaxonomies > option").prop("selected","selected"),o.trigger("change")}),e("#converterForm #submit").click(function(s){var c=t.val()?t.val():[],a=o.val()?o.val():[],i=0,l=0;e.ajax({url:AgpSettings.endpoints.check,method:"POST",dataType:"json",beforeSend:function(t){n.hide(),e("#converterForm input, #converterForm select, #converterForm button").prop("disabled",!0),t.setRequestHeader("X-WP-Nonce",AgpSettings.nonce)},data:{post_types:c,taxonomies:a}}).done(function(t){if(t.data.posts+t.data.terms>0){var o=()=>{e.ajax({url:AgpSettings.endpoints.convert,method:"POST",dataType:"json",beforeSend:function(e){r(AgpSettings.messages.converting,"",i,t.data.posts,l,t.data.terms),e.setRequestHeader("X-WP-Nonce",AgpSettings.nonce)},data:{post_types:c,taxonomies:a,limit:100}}).done(function(t){t.data.posts+t.data.terms>0?(i+=t.data.posts,l+=t.data.terms,o()):(r(AgpSettings.messages.success,"success",i,l),e("#converterForm input, #converterForm select, #converterForm button").prop("disabled",!1))}).fail(function(t){r(t.responseJSON.message,"error"),e("#converterForm input, #converterForm select, #converterForm button").prop("disabled",!1)})};o()}else r(t.message,"success"),e("#converterForm input, #converterForm select, #converterForm button").prop("disabled",!1)}).fail(function(t){r(t.responseJSON.message,"error"),e("#converterForm input, #converterForm select, #converterForm button").prop("disabled",!1)})})}():"permalink_settings"===t&&function(){var t=document.getElementById("agpAutomatic"),o=[document.getElementById("selectPosts"),document.getElementById("selectTaxonomies")];function n(){var e=document.getElementById("agp_custom_automatic_options");t.checked?(e.style.display="block",o.forEach(function(e){e.disabled=!1})):(e.style.display="none",o.forEach(function(e){e.disabled=!0}))}n(),t.addEventListener("click",function(){n()}),o.forEach(function(t){e(t).on("select2:select",function(o){var n=o.params.data;"all_options"===n.id||"no_options"===n.id?e(t).val(n.id).trigger("change"):(e(t).find('option[value="all_options"]').prop("selected",!1),e(t).find('option[value="no_options"]').prop("selected",!1),e(t).trigger("change"))})})}()}(jQuery);