mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-29 20:47:45 +01:00
e6e4496822
Props azaozz. See #29974. Built from https://develop.svn.wordpress.org/trunk@35593 git-svn-id: http://core.svn.wordpress.org/trunk@35557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 line
1.1 KiB
JavaScript
1 line
1.1 KiB
JavaScript
var addComment={moveForm:function(a,b,c,d){var e,f,g,h,i,j=this,k=j.I(a),l=j.I(c),m=j.I("cancel-comment-reply-link"),n=j.I("comment_parent"),o=j.I("comment_post_ID"),p=l.getElementsByTagName("form")[0];if(k&&l&&m&&n&&p){j.respondId=c,d=d||!1,j.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",l.parentNode.insertBefore(e,l)),k.parentNode.insertBefore(l,k.nextSibling),o&&d&&(o.value=d),n.value=b,m.style.display="",m.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{for(var q=0;q<p.elements.length;q++)if(f=p.elements[q],"hidden"!==f.type&&!f.hasAttribute("disabled")){if("getComputedStyle"in window){for(g=f,i=!1;g.parentNode;){if(h=window.getComputedStyle(g),"none"===h.display||"hidden"===h.visibility){i=!0;break}g=g.parentNode}if(i)continue}f.focus();break}}catch(r){}return!1}},I:function(a){return document.getElementById(a)}}; |