text: !function(n){n(".js-comments");function o(e,t){n(".js-modal-title").text(e),n(".js-modal-text").html(t),n("body").addClass("show-modal")}n(".js-form").submit(function(){var t=this;return n("#comment-form-submit").html('<svg class="icon spin"><use xlink:href="#icon-loading"></use></svg> Sending...'),n(t).addClass("disabled"),n.ajax({type:n(this).attr("method"),url:n(this).attr("action"),data:n(this).serialize(),contentType:"application/x-www-form-urlencoded",success:function(e){o("Comment submitted",'Thanks! Your comment is <a href="https://github.com/raphaelbittan/raphaelbittan.github.io/pulls">Pending</a>. It will appear when approved.'),n("#comment-form-submit").html("Submit"),n(t)[0].reset(),n(t).removeClass("disabled"),grecaptcha.reset()},error:function(e){console.log(e),o("Error","An error occured.<br>["+((e.responseJSON||{}).errorCode||"unknown")+"]"),n("#comment-form-submit").html("Submit"),n(t).removeClass("disabled"),grecaptcha.reset()}}),!1}),n(".js-close-modal").click(function(){n("body").removeClass("show-modal")})}(jQuery);var addComment={moveForm:function(e,t,n,o,i){var r,m,s,l,a=this,d=a.I(e),c=a.I(n),u=a.I("cancel-comment-reply-link"),p=a.I("comment-replying-to"),f=a.I("comment-replying-to-uid"),h=a.I("comment-post-slug"),y=c.getElementsByTagName("form")[0];if(d&&c&&u&&p&&y){a.respondId=n,o=o||!1,a.I("sm-temp-form-div")||((r=document.createElement("div")).id="sm-temp-form-div",r.style.display="none",c.parentNode.insertBefore(r,c)),d.parentNode.insertBefore(c,d.nextSibling),h&&o&&(h.value=o),p.value=t,f.value=i,u.style.display="",u.onclick=function(){var e=addComment,t=e.I("sm-temp-form-div"),n=e.I(e.respondId);if(t&&n)return e.I("comment-replying-to").value=null,e.I("comment-replying-to-uid").value=null,t.parentNode.insertBefore(n,t),t.parentNode.removeChild(t),this.style.display="none",this.onclick=null,!1};try{for(var g=0;g<y.elements.length;g++)if(m=y.elements[g],l=!1,"getComputedStyle"in window?s=window.getComputedStyle(m):document.documentElement.currentStyle&&(s=m.currentStyle),(m.offsetWidth<=0&&m.offsetHeight<=0||"hidden"===s.visibility)&&(l=!0),"hidden"!==m.type&&!m.disabled&&!l){m.focus();break}}catch(e){}return!1}},I:function(e){return document.getElementById(e)}};