summaryrefslogtreecommitdiff
blob: 11008e6a45c980573530233b5a1f23ac127b303a (plain)
1
2
/* Do not modify this file directly. It is compiled from other files. */
jQuery(document).ready(function(t){var e="https://public-api.wordpress.com/rest/v1",n=[];t(".comment-like-count").each(function(){var e=t(this).attr("data-blog-id"),a=t(this).attr("data-comment-id");n.push("/sites/"+e+"/comments/"+a+"/likes")}),t.ajax({type:"GET",url:e+"/batch",dataType:"jsonp",data:"urls[]="+n.map(encodeURIComponent).join("&urls[]="),success:function(e){for(var n in e)if(!e[n].error_data){var a=n.split("/")[4],o=e[n].found;if(o<1)return;t("#comment-like-count-"+a).find(".like-count").hide().text(o).fadeIn()}},error:function(){}})});