当前位置 : 主页 > 网络编程 > JavaScript >

for cnblogs init .

来源:互联网 收集:自由互联 发布时间:2021-06-30
cnblogs.js console.log('init runcode.js')function runcode() { var win = window.open(); win.document.write($('.runcode').val());}/***********tag cloud script****************/ if($("#MyTag").length0) { var dict = {}; $("#taglist td").has("a")
cnblogs.js
console.log('init runcode.js')
function runcode() {

    var win = window.open();

    win.document.write($('.runcode').val());

}

/***********tag cloud script****************/ 
if($("#MyTag").length>0) 
{ 
var dict = {}; 
$("#taglist td").has("a").has("span").each(function(i, x){ 
dict[$("a", this).text()] = $("span", this).text().replace(/[)(]/g, ""); 
}); 
$("
 
  ").attr("id", "tagCloud").appendTo("div#mainContent"); 
for(var k in dict) 
{ 
var sz = (dict[k] * 4) + 12; 
$("
  ") .attr("href", "http://www.cnblogs.com/sixloop/tag/"+escape(k)+"/") .attr("title", dict[k]) .css("font-size", sz + "px") .text(k) .appendTo("#tagCloud"); } $("#taglist").remove(); }
 
网友评论