skip to main
|
skip to sidebar
look bug
ไม่มีบทความ
ไม่มีบทความ
หน้าแรก
สมัครสมาชิก:
บทความ (Atom)
/*
Simple Blogger Tag Cloud Widget
by Raymond May Jr.
http://www.compender.com
Released to the Public Domain
*/
//Settings / Variables
var max = 150; //max css size (in percent)
var min = 70; //min css size (in percent)
var showCount = false; // show counts? true for yes, false for no
var minCount = 1; // what is the minimum count for a tag to be shown? 1 for all
//Begin code:
var range = max - min;
//Build label Array
var labels = new Array();
labels.push("
");
//URLs
var urls = new Array();
urls.push("
");
//Counts
var counts = new Array();
counts.push("
");
//Number sort funtion (high to low)
function sortNumber(a, b)
{
return b - a;
}
//Make an independant copy of counts for sorting
var sorted = counts.slice();
//Find the largest tag count
var most = sorted.sort(sortNumber)[0];
//Begin HTML output
for (x in labels)
{
if(x != "peek" && x != "forEach" && counts[x] >= minCount)
{
//Calculate textSize
var textSize = min + Math.floor((counts[x]/most) * range);
//Show counts?
if(showCount)
{
var count = "(" + counts[x] + ")";
}else{
var count = "";
}
//Output
document.write("
" + labels[x] + count + "
" );
}
}
wolder
,
moonlie
,
wallpaper
,
mbloop
,
lookbug
,
taiku
,
taipin
,
neso