관리-도구
편집 파일: metabox.min.js
jQuery(document).ready(function(e){var t=!1,i=e("#yarpp-related-posts");function a(){e("#yarpp_relatedposts")&&i.length&&e("#post_ID").val()&&(t||(t=!0,s(!1)))}function s(t){var a={action:"yarpp_display",domain:"metabox",ID:parseInt(e("#post_ID").val()),_ajax_nonce:e("#yarpp_display-nonce").val()};void 0!==t&&t&&(a.refresh=!0),e.ajax({type:"POST",url:ajaxurl,data:a,error:function(){i.html("Error")},success:function(t){i.html(t)},dataType:"html"})}e("#yarpp_relatedposts .handlediv, #yarpp_relatedposts-hide").click(function(){setTimeout(a,0)}),e(document).on("touchstart mouseenter","#yarpp-list li",function(){e(this).children(".yarpp-related-action").css("visibility","visible")}),e(document).on("touchend mouseleave","#yarpp-list li",function(){e(this).children(".yarpp-related-action").css("visibility","hidden")}),e(document).on("click","#yarpp-refresh",function(t){t.preventDefault();e("#yarpp-related-posts");if(e(this).hasClass("disabled"))return!1;var t=e(this),a=t.siblings(".spinner");t.addClass("yarpp-disabled"),a.css("visibility","visible"),e("#yarpp-list").css("opacity",.6),s(!0)}),a()});