function setCopyBtn(){$(".CopyToClipboard").each(function(){var t=new ZeroClipboard.Client;t.setHandCursor(!0),t.addEventListener("load",function(t){}),t.addEventListener("mouseOver",function(t){var e=t.movie.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling.innerHTML;e=e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),t.setText(e)}),t.addEventListener("complete",function(t,e){alert("代码已经复制到你的剪贴板。")}),t.glue(this,this.parentNode)})}function m_over_m(t,e){__mm_over=!0,showMedalInfo(t.target,e)}function m_out_m(){__mm_over=!1,hideMedalInfo()}function showMedalInfo(t,e){__mm_intro&&(document.body.removeChild(__mm_intro),__mm_intro=null);var i="",n=$(t).attr("src"),o="",s="";n.indexOf("zhuanlandaren")>-1?(o="专栏达人",s="授予成功创建个人博客专栏的用户。专栏中添加五篇以上博文即可点亮!撰写博客专栏浓缩技术精华,专栏达人就是你!"):n.indexOf("chizhiyiheng")>-1?(o="持之以恒",s="授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!"):n.indexOf("weiruanmvp")>-1?(o="微软MVP",s="授予通过CSDN博客平台积极分享微软相关技术知识和专业技能,并做出突出贡献的用户。"):n.indexOf("bokezhixing")>-1&&(o="博客之星",s='授予通过"CSDN博客之星评选"中脱颖而出的十大博客之星称号的用户。'),i+="
",i+=""+a+""+n):n=this.getCodeInfo(r[0])}else{var r=this.getReplyInfo(t.Content);o=r[1];var l=r.length>2?this.getQuoteInfo(r[2]):this.getQuoteInfo(r[0]);l.length>1?(s=l[1],a=this.getCodeInfo(l[2]),n=this.getCodeInfo(l[3]),n='引用“'+s+"”的评论:
"+a+""+n):n=this.getCodeInfo(l[0])}var c="https://me.csdn.net/",h="匿名用户"!=t.UserName?c+t.UserName:"javascript:void(0);",d='
'+e(n)+"
"});return i},t.prototype.replayComment=function(t){var e=t.Id,i=t.User;this.txtComment.val("[reply]"+i+"[/reply]\r\n"),this.commentTxt.val(e)},t.prototype.commentCode=function(){var t=this;$("#commentCode").find("a").click(function(){var e=t.txtComment.data("selector"),i="[code="+$(this).data("code")+"]\n"+e+"\n[/code]",n=t.txtComment.val();t.txtComment.val(n+i)})},t.prototype.comment=function(){var t=this;$("#commentform").submit(function(){if(!currentUserName)return t.setStorage(),!1;window.localStorage.removeItem("AM_comment_data");var e=$(this).find(":submit"),i={replyId:t.commentTxt.val(),content:t.txtComment.val()};if(""===i.content)alert("请填写评论内容");else{var n=blog_address+"/phoenix/comment/submit?id="+articleId;$.ajax({url:n,type:"post",data:i,beforeSend:function(){e.prop("disabled",!0).val("提交中")},success:function(e){1===e.result?(t.commentForm.trigger("reset"),t.commentTxt.val(""),window.right_recommend.updata_ISThirdcolumnshow_commnet(),ISThirdcolumnshow_commnet?(window.right_recommend.openToolStyleChange(!0),0==$(".right_recommend_comment").length&&$(".recommend-fixed-box").prepend('最多只允许输入30个字
$2'),e=e.replace(/\[reply]([\s\S]*?)\[\/reply\][\r\n]{0,2}/gi,""),e=e.replace(/\[url=([^\]]+)]([\s\S]*?)\[\/url\]/gi,'$2'),e=e.replace(/\[img(=([^\]]+))?]([\s\S]*?)\[\/img\]/gi,''),e=e.replace(/\r?\n/gi,"
'+csdn.htmlEncode_Escape(i)+"
"})}function n(){$(document).on("click",".right_recommend_comment_button",function(t){var e=$(t.target).data("type");if(void 0!==e)switch(e){case"report":showReport(!0);break;case"reply":location.href="#commentsedit";var i=$(t.target).parents(".right_recommend_comment_button"),n={};n.Id=i.data("commentid"),n.User=i.data("replyname"),window.csdn.comments.replayComment(n),window.csdn.comments.txtComment.trigger("focus");break;case"readreply":var i=$(t.target).parents(".comment_content");i.data("childshow")?(i.find("dd").hide(),$(t.target).text("查看回复")):(i.find("dd").show(),$(t.target).text("收起回复")),i.data("childshow",!i.data("childshow"));break;case"delete":var o=$(t.target).parents(".right_recommend_comment_button "),s=o.data("commentid");window.csdn.comments.deleteComment(s)}}),$(document).on("click",".right_recommned_write",function(){$("#comment_content")[0].focus(),$("html,body").animate({scrollTop:$(".comment-box").offset().top},500)})}function o(){l.text("加载更多评论中..."),f(20)}function s(){a.html(""),c=!1,h=1,d=!0,f(20)}var a=$(".right_recommend_comment_content"),r=$(".right_recommend_comment"),l=$(".jump_comment_page_button"),c=!1,h=1,d=!0,u=!1,p=0,m=0,f=function(e,i){a=$(".right_recommend_comment_content"),r=$(".right_recommend_comment");var e=e?e:10,o="";$.get(blog_address+"/phoenix/comment/list/"+articleID+"?page="+h+"&size="+e+"&tree_type=1",function(s){if(d=!0,null==s.data)return"function"==typeof i&&i(),!1;if(p=s.data.floor_count,0===s.data.list.length&&1==h&&r.hide(),0===s.data.list.length)return r.append('
';for(var a=0;a
",e+="