$(function(){var a="Oops, something went wrong. Please try again later.";$(".comment_button").click(function(){$.ajax({url:window.location.pathname+"/comment",type:"POST",data:{text:$("#comment-form-text").val()},success:function(b,c){window.location.href=b},error:function(c,b,d){$(".response_comment_form").append('<div class="comment-error">'+a+"</div>")}})});$(".comments .delete a").click(function(b){b.preventDefault();$.ajax({url:window.location.pathname+"/comment/"+$(this).attr("id"),type:"DELETE",success:function(c,d){window.location.href=c},error:function(d,c,f){$(this).append('<div class="comment-error">'+a+"</div>")}})})});
