MediaWiki:Skin/Kamelopedia:Aktive Seiten.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
J* (Diskussion | Beiträge) (Botedits und kleine Edits raus) |
J* (Diskussion | Beiträge) K |
||
Zeile 31: | Zeile 31: | ||
{ | { | ||
clowd_prio[title] = clowd_prio[title] + 1; | clowd_prio[title] = clowd_prio[title] + 1; | ||
− | |||
jQuery("#"+id).css("font-size", (1+Math.log(clowd_prio[title]))*100 + "%"); | jQuery("#"+id).css("font-size", (1+Math.log(clowd_prio[title]))*100 + "%"); | ||
jQuery("#"+id).css("line-height","100%"); | jQuery("#"+id).css("line-height","100%"); |
Version vom 12. Oktober 2011, 12:54 Uhr
addOnloadHook( function () {
clowd_prio = {};
jQuery.ajax({
url: "/api.php",
data: {
action: "query",
list: "recentchanges",
rclimit: 500,
rcprop: "title",
rctype: "edit|new",
rcnamespace: "0|6|106|108|112",
rcshow: "!minor|!bot",
format: "xml"
},
success: function (r) {
jQuery("#clowd").html("");
var rcs = jQuery(r).find("rc");
rcs.each( function () {
var title = jQuery(this).attr("title");
var id = "tag_for_page_"+escape(title).replace(/[%.:'"]/g,"_");
if( jQuery("#"+id).length == 0 )
{
jQuery("#clowd").append("<span class='clowd_item' id='"+id+"'><a /> </span>");
jQuery("#"+id+" a").text(title);
jQuery("#"+id+" a")[0].href = "/index.php/"+title;
clowd_prio[title] = 1;
}
else
{
clowd_prio[title] = clowd_prio[title] + 1;
jQuery("#"+id).css("font-size", (1+Math.log(clowd_prio[title]))*100 + "%");
jQuery("#"+id).css("line-height","100%");
}
});
}
});
});