first commit

This commit is contained in:
2024-11-04 20:48:19 +01:00
commit 2fa33a3be9
7968 changed files with 2313063 additions and 0 deletions

View File

@@ -0,0 +1 @@
jQuery(document).ready(function(o){["edit-page","edit-post"].includes(pagenow)||($bulktop=o("#bulk-action-selector-top"),$bulkbot=o("#bulk-action-selector-bottom"),($bulktop.length>0||$bulkbot.length>0)&&(0==$bulktop.find('[value="cdp_bulk_copy"]').length&&$bulktop.append('<option value="cdp_bulk_copy">'+cdpBulkJS.strOptCopy+"</option>"),0==$bulkbot.find('[value="cdp_bulk_copy"]').length&&$bulkbot.append('<option value="cdp_bulk_copy">'+cdpBulkJS.strOptCopy+"</option>"),o("#cdp-current-post-id").remove()))});

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
jQuery(document).ready(function(t){if(t(document).on("readystatechange",function(){e(10)}),e(10),e(100),e(300),$button=t(t(".edit-post-header__settings").find('.components-button.components-icon-button[aria-label="Settings"]')[0]),$button.on("click",e),t(".edit-post-sidebar__panel-tab").on("click",e),t("#cdp-original-post").length>0){let e=t("#cdp-original-post").attr("data-cdp-parent"),n=t("#cdp-original-post").attr("data-cdp-parent-url");t(".edit-post-header-toolbar").append(t(`<div class="cdp-original-info-b">This post is a duplicate of <a href="${n}" target="_blank">${e}</a></div>`))}function e(e=100){"number"!=typeof e&&(e=100),setTimeout(()=>{0==t(".cdp-editor-gutenberg-copy").length&&($parent=t(".editor-post-trash").parents(".components-panel__row"),$html='<button type="button" class="components-button cdp-editor-gutenberg-copy is-button is-default is-large">'+cdpGutenbergJS.cdpCopy+"</button>",t($parent).prepend($html))},e)}setInterval(()=>{t(".cdp-editor-gutenberg-copy").length<=0&&e(10)},3e3),t(window).on("resize",e)});

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
jQuery(document).ready(function(o){o("#cdp-purl").val();let t="default";function e(){o.cdpModal("cdp-copy-modal-global");let t=o(".cdp-modal-input-profiles-r").val();o('[name="tooltip-which-profile-second-modal"]').val(t),o('.cdp-input-dynamic[name="tooltip-which-profile-second-modal"]').trigger("change")}function c(){if(o("#cdp-current-post-id").length>0)return[o("#cdp-current-post-id").val()];$rows=o("#the-list").find("tr"),$ids=[];for(var t=0;t<$rows.length;t++){let e=o($rows[t]);e.find('input[name="post[]"]').is(":checked")&&$ids.push(e.find('input[name="post[]"]').attr("value"))}return $ids}function n(t=(()=>{})){window.onbeforeunload=null,$e=o(".cdp-copy-loader-overlay"),$e.is(":hidden")||$e.animate({opacity:0},300,function(){$e.hide(),t(!0)})}o(".cdp-admin-bar-copy").on("click",e),o("body").on("click",".cdp-editor-gutenberg-copy",e),o("body").on("click",".cdp-copy-btn-editor",e),o("body").on("click",".cdp-copy-modal-button",function(){let e=o(this).attr("data-cdp-btn"),i=["copy-quick","copy-custom","copy-custom-link"];if(i.includes(e)){let d={type:e},p=c(),l=o(".cdp-modal-checkboxes").find(".cdp-modal-option-r");if(p.length<=0)return void o.cdpNotification("warning",cdpModalJS.strRowCopyTryAgain);let a=o(".cdp-modal-input-profiles-r").val();d.custom={},d.times=o(".cdp-modal-input-times").val(),d.swap="2"==o(".cdp-swap").val()?"true":"false",d.profile=a,o(".cdp-multiple-sites-selector").is(":hidden")?d.site=o(".cdp-multi-site-at-once-selector select").val():d.site=o('.cdp-input-dynamic[name="tooltip-which-site-second-modal"]').val();let s=["clear","alloptions","custom","custom_named","null","undefined",null,void 0];if(a&&!s.includes(a)&&(t=a),!d.profile){if(!t||s.includes(t))return o.cdpNotification("warning",cdpModalJS.strSettCopyIssue),void n();d.profile=t}for(let t=0;t<l.length;++t)d.custom[o(l[t]).attr("name")]=o(l[t]).is(":checked");setTimeout(()=>{let t=o.cdptipster.instances();for(instance in t)t[instance].close()},10),function(t=(()=>{})){window.onbeforeunload=(()=>cdpModalJS.strCopyInProgress),$e=o(".cdp-copy-loader-overlay"),$e.is(":hidden")&&($e.show(),$e.animate({opacity:1},300,function(){t(!0)}))}(()=>{o.ajax({type:"POST",url:ajaxurl,data:{action:"cdp_action_handling",token:"cdp",f:"copy_post",nonce:cdpGlobalJS.ajaxNonce,origin:"modal",id:p,data:d},timeout:0}).done(function(t){o.isJsonString(t)&&(t=o.cdpParse(t));"error"==t.status?o.cdpNotification("error",cdpModalJS.strPostCopyIssue):(n(),e==i[2]||t.link&&t.link.length>0?"pConv"==t.link?(o.post(ajaxurl,{action:"cdp_action_handling",nonce:cdpGlobalJS.ajaxNonce,token:"cdp",f:"delete_success_img"}),"-28"==o(".cdp-copy-alert-success").position().top&&o(".cdp-copy-alert-success").animate({top:"32px",opacity:1},300),setTimeout(()=>{"32"==o(".cdp-copy-alert-success").position().top&&o(".cdp-copy-alert-success").animate({top:"-28px",opacity:0},300)},3e3),o.cdpModalClose("cdp-copy-modal-global")):window.location.href=t.link:"undefined"==typeof pagenow||"post"==pagenow||"page"==pagenow?(o.post(ajaxurl,{action:"cdp_action_handling",nonce:cdpGlobalJS.ajaxNonce,token:"cdp",f:"delete_success_img"}),"-28"==o(".cdp-copy-alert-success").position().top&&o(".cdp-copy-alert-success").animate({top:"32px",opacity:1},300),setTimeout(()=>{"32"==o(".cdp-copy-alert-success").position().top&&o(".cdp-copy-alert-success").animate({top:"-28px",opacity:0},300)},3e3),o("#cdp_notice_error_modal").length>0&&(o("#cdp_notice_error_modal").show(),o("#cdp_notice_error_modal").fadeIn(300),o("#cdp_notice_error_modal").animate({opacity:1},500),o("#cdp_notice_error_modal .cdp_notice_content").animate({opacity:1,top:"50%"},500)),o.cdpModalClose("cdp-copy-modal-global")):location.reload())}).fail(function(t){o.cdpNotification("error",cdpModalJS.strPostCopyIssueConsoleInfo),n(),console.log(t),console.log(t.responseText)})})}else o.cdpNotification(cdpModalJS.strRecogBtnIssue)}),o("body").on("click",".cdp-modal-copy-times-content .cdp-multiple-sites-selector",function(){o(".cdp-modal-copy-times-content .cdp-modal-select-2").fadeOut(300),o(".cdp-modal-copy-times-content .cdp-multiple-sites-selector").hide(300),o(".cdp-modal-copy-times-content .cdp-multi-site-at-once-selector").show(300)}),o("body").on("change","select.cdp-modal-input-profiles-r",function(){let e=["clear","alloptions","custom","custom_named","null","undefined",null,void 0];o(this).val()&&!e.includes(o(this).val())&&(t=o(this).val())}),o("#posts-filter").on("submit",function(t){"cdp_bulk_copy"==o("#bulk-action-selector-top").val()&&(t.preventDefault(),$ids=c(),$ids.length<=0?o.cdpNotification("warning",cdpModalJS.strRowCopyIssue):e())})});

View File

@@ -0,0 +1 @@
!function(e){e.fn.cdpNiceSelect=function(t){function s(t){t.after(e("<div></div>").addClass("cdp-nice-select").addClass(t.attr("class")||"").addClass(t.attr("disabled")?"disabled":"").attr("tabindex",t.attr("disabled")?null:"0").html('<span class="current"></span><ul class="list"></ul>'));var s=t.next(),c=t.find("option"),n=t.find("option:selected");s.find(".current").html(n.data("display")||n.text()),c.each(function(t){var c=e(this),n=c.data("display");s.find("ul").append(e("<li></li>").attr("data-value",c.val()).attr("data-display",n||null).addClass("option"+(c.is(":selected")?" selected":"")+(c.is(":disabled")?" disabled":"")).html(c.text()))})}if("string"==typeof t)return"update"==t?this.each(function(){var t=e(this),c=e(this).next(".cdp-nice-select"),n=c.hasClass("open");c.length&&(c.remove(),s(t),n&&t.next().trigger("click"))}):"destroy"==t?(this.each(function(){var t=e(this),s=e(this).next(".cdp-nice-select");s.length&&(s.remove(),t.css("display",""))}),0==e(".cdp-nice-select").length&&e(document).off(".cdp_nice_select")):console.log('Method "'+t+'" does not exist.'),this;this.hide(),this.each(function(){var t=e(this);t.next().hasClass("cdp-nice-select")||s(t)}),e(document).off(".cdp_nice_select"),e(document).on("click.cdp_nice_select",".cdp-nice-select",function(t){var s=e(this);e(".cdp-nice-select").not(s).removeClass("open"),s.toggleClass("open"),s.hasClass("open")?(s.find(".option"),s.find(".focus").removeClass("focus"),s.find(".selected").addClass("focus")):s.focus()}),e(document).on("click.cdp_nice_select",function(t){0===e(t.target).closest(".cdp-nice-select").length&&e(".cdp-nice-select").removeClass("open").find(".option")}),e(document).on("click.cdp_nice_select",".cdp-nice-select .option:not(.disabled)",function(t){var s=e(this),c=s.closest(".cdp-nice-select");c.find(".selected").removeClass("selected"),s.addClass("selected");var n=s.data("display")||s.text();c.find(".current").text(n),c.prev("select").val(s.data("value")).trigger("change")}),e(document).on("keydown.cdp_nice_select",".cdp-nice-select",function(t){var s=e(this),c=e(s.find(".focus")||s.find(".list .option.selected"));if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?c.trigger("click"):s.trigger("click"),!1;if(40==t.keyCode){if(s.hasClass("open")){var n=c.nextAll(".option:not(.disabled)").first();n.length>0&&(s.find(".focus").removeClass("focus"),n.addClass("focus"))}else s.trigger("click");return!1}if(38==t.keyCode){if(s.hasClass("open")){var l=c.prevAll(".option:not(.disabled)").first();l.length>0&&(s.find(".focus").removeClass("focus"),l.addClass("focus"))}else s.trigger("click");return!1}if(27==t.keyCode)s.hasClass("open")&&s.trigger("click");else if(9==t.keyCode&&s.hasClass("open"))return!1});var c=document.createElement("a").style;return c.cssText="pointer-events:auto","auto"!==c.pointerEvents&&e("html").addClass("no-csspointerevents"),this}}(jQuery),jQuery(document).ready(function(e){e("body").on("mousewheel DOMMouseScroll",".cdp-nice-select .list, .cdp-content-with-scroll",function(t){let s=null;"mousewheel"==t.type?s=-1*t.originalEvent.wheelDelta:"DOMMouseScroll"==t.type&&(s=40*t.originalEvent.detail),s&&(t.preventDefault(),e(this).scrollTop(s+e(this).scrollTop()))})});

View File

@@ -0,0 +1 @@
jQuery(document).ready(function(e){});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long