text: $(document).ready(function(){const e=$("#cnblogs_post_body");if(0===e.length)return;const a=e.find(":header");if(0!==a.length){var n=[],s=0,t=!1,r=0,d=0;a.each(function(){var e=$(this),a=e[0];if(-1===$.inArray(a.tagName.toLowerCase(),["h1","h2"]))return!0;n.push(e)}),n.length>0&&$.each(n,function(e){var a=$(this);switch(a[0].tagName.toLowerCase()){case"h1":!function(e){var a=_(e.text());t||(t=!0);e.wrap('<span title-type="h1" class="header__span"></span>'),e.text(""),e.addClass("header__dev");var n='<b class="dev__fe"><i>'+(s+1)+"</i></b>";n+='<span class="dev__slash">|</span>',n+='<b class="dev__ux"><i>0</i></b>',n+='<b class="dev__developer"><span class="dev__title">'+a+"</span></b>",e.append(n),e.parents(".header__span").after("<br>"),e.parent(".header__span").hover(function(){$(this).find(".header__dev").addClass("header__dev--open")},function(){$(this).find(".header__dev").removeClass("header__dev--open")}),s++}(a);break;case"h2":t&&function(e,a){var s=_(e.text());e.wrap('<span title-type="h2" class="header__span"></span>'),e.text(""),e.addClass("header__dev");var t=[];if($.each(n,function(e){if(e>a)return!1;var n=$(this);"h1"===n[0].tagName.toLowerCase()&&t.push(n.parents(".header__span"))}),t.length>0){t=$(t[t.length-1]);var h=parseInt(t.find(".dev__fe i").text());h!==d&&(r=0),d=h}else r=0;var i='<b class="dev__fe"><i>'+d+"</i></b>";i+='<span class="dev__slash">|</span>',i+='<b class="dev__ux"><i>'+ ++r+"</i></b>",i+='<b class="dev__developer"><span class="dev__title">'+s+"</span></b>",e.append(i),e.parents(".header__span").after("<br>"),e.parent(".header__span").hover(function(){$(this).find(".header__dev").addClass("header__dev--open")},function(){$(this).find(".header__dev").removeClass("header__dev--open")})}(a,e)}})}function _(e){var a=document.createElement("div");null!=a.textContent?a.textContent=e:a.innerText=e;var n=a.innerHTML;return a=null,n}});
  
  $(document).ready(function(){var a,i=$("body"),t="sideCatalogBtn",e="",s=$("#cnblogs_post_body");if(0!==s.length){i.append('<div id="sideToolbar"style="display:none;"><div class="sideCatalogBg"id="sideCatalog"><div id="sideCatalog-sidebar"><div class="sideCatalog-sidebar-top"></div><div class="sideCatalog-sidebar-bottom"></div></div><div id="sideCatalog-catalog"><ul class="nav"style="width:230px;zoom:1"></ul></div></div><a href="javascript:void(0);"id="sideCatalogBtn"class="sideCatalogBtnDisable"></a></div>'),a=s.find(":header");var l=[];a.each(function(){var a=$(this),i=a[0];if(-1===$.inArray(i.tagName.toLowerCase(),["h1","h2"]))return!0;var t=a.find(".dev__fe").text(),s=a.find(".dev__ux").text(),d=a.find(".dev__developer").text(),n=d.replace(/\s/g,"__a__"),r=n.match(/[A-Z a-z 0-9 \. \_ \- \u4E00-\u9FA5\uF900-\uFA2D]/g);n=r.join("").toLowerCase(),l.push(n);var g=function(a){var i=0;return-1===$.inArray(a,l)?i:($.each(l,function(t){l[t]===a&&i++}),i>0?i-1:0)}(n),c=n.replace(/__a__/g,"-");a.attr("id",0===g?c:c+"-"+g),"h1"===i.localName?(0,0,d.length>26&&(d=d.substr(0,26)+"..."),d=o(d),e+='<li h="1" g="'+t+'"><a href="#'+a.attr("id")+'">'+t+"."+s+"&nbsp;&nbsp;"+d+'</a><span class="sideCatalog-dot"></span></li>'):"h2"===i.localName&&(0,0,d.length>30&&(d=d.substr(0,30)+"..."),d=o(d),e+='<li h="2" g="'+t+'" class="h2Offset ceg'+t+'"><a href="#'+a.attr("id")+'">'+t+"."+s+"&nbsp;&nbsp;"+d+"</a></li>")}),$("#sideCatalog-catalog>ul").html(e),i.data("spy","scroll"),i.data("target",".sideCatalogBg"),i.scrollspy({target:".sideCatalogBg"}),$sideCatelog=$("#sideCatalog"),$("#"+t).on("click",function(){$(this).hasClass("sideCatalogBtnDisable")&&"visible"===$sideCatelog.css("visibility")?($sideCatelog.css("visibility","hidden"),$(this).removeClass("sideCatalogBtnDisable")):($sideCatelog.css("visibility","visible"),$(this).addClass("sideCatalogBtnDisable"))}),$("#sideToolbar-up").on("click",function(){$("html,body").animate({scrollTop:0},500)}),$sideToolbar=$("#sideToolbar");var d=$("#sideCatalog-catalog").find("ul li");0===d.length&&($sideCatelog.css("visibility","hidden"),$("#"+t).removeClass("sideCatalogBtnDisable")),d.on("activate.bs.scrollspy",function(){var a=$(this).attr("g"),i=$("#sideCatalog-catalog");i.find(".h2Offset").hide(),i.find(".ceg"+a).show()})}function o(a){var i=document.createElement("div");null!=i.textContent?i.textContent=a:i.innerText=a;var t=i.innerHTML;return i=null,t}});
  
  jQuery.fn.wait=function(s,t,a){var o,i=t||-1,n=a||20,e=this,l=this.selector;return this.length?s&&s.call(this):o=setInterval(function(){i||clearInterval(o),i<=0||i--,(e=$(l)).length&&(s&&s.call(e),clearInterval(o))},n),this},$(document).ready(function(){$("#cnblogs_post_body pre").find(">code").parent().css({border:"dashed 1px #aaa","border-left":"solid 2px #6CE26C"});var s=window.location.href.split("/"),t=s[s.length-1],a=(t=t.split("#")[0]).split("?")[0].replace(".html",""),o='<br><p class="essaySuffix-eof">__EOF__</p>';o+='<div class="essaySuffix-box">',o+='<div class="essaySuffix-box-left"><img src="'+(window.cnblogsConfig.essaySuffix.codeImgUrl?window.cnblogsConfig.essaySuffix.codeImgUrl:window.cnblogsConfig.blogAvatar)+'" alt=""/></div>',o+='<div class="essaySuffix-box-right">';var i="",n="",e=$("#articleAuthor").val(),l=$("#articleSource").val();if(void 0!==e&&void 0!==l)i=e,n=l;else{var r=window.cnblogsConfig.blogUser?window.cnblogsConfig.blogUser:"",f=s;f.pop(),f.pop(),f=f.join("/"),i=r||s[3],n=f}o+='<span class="essaySuffix-right-title">作　　者</span>：<strong><span style="font-size: 12px;">',o+='<a href="'+n+'" target="_blank">'+i+"</a></span></strong> <br>",o+='<span style="font-weight: bold; white-space:nowrap;">出　　处</span>：<a href="'+n+'" target="_blank">'+n+"</a><br>",o+='<span class="essaySuffix-right-title">关于博主</span>：'+(window.cnblogsConfig.essaySuffix.aboutHtml?window.cnblogsConfig.essaySuffix.aboutHtml:'热爱生活，爱读书/旅游，喜欢技术，乐于专研。评论和私信会在第一时间回复。或者<a href="https://msg.cnblogs.com/msg/send/'+s[3]+'" target="_blank">直接私信</a>我。')+"<br>",o+='<span class="essaySuffix-right-title">版权声明</span>：'+(window.cnblogsConfig.essaySuffix.copyrightHtml?window.cnblogsConfig.essaySuffix.copyrightHtml:'署名 - 非商业性使用 - 禁止演绎，<a href="https://creativecommons.org/licenses/by-nc-nd/4.0/" alt="协议普通文本" title="协议普通文本" target="_blank">协议普通文本</a> | <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode" alt="协议法律文本" title="协议法律文本" target="_blank">协议法律文本</a>。')+"<br>",o+='<span class="essaySuffix-right-title">声援博主</span>：'+(window.cnblogsConfig.essaySuffix.supportHtml?window.cnblogsConfig.essaySuffix.supportHtml:'如果您觉得文章对您有帮助，可以点击文章右下角<strong><span style="color: #ff0000; font-size: 12pt;">【<a id="post-up" onclick="votePost('+a+',\'Digg\')" href="javascript:void(0);">推荐</a>】</span></strong>一下。您的鼓励是博主的最大动力！')+"<br>",o+="</div>",o+='<div style="clear: both;"></div>',o+="</div>",$("#cnblogs_post_body").append(o)});