MediaWiki:Skin/Kamelopedia:Aktive Seiten.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
J* (Diskussion | Beiträge) |
J* (Diskussion | Beiträge) (Botedits und kleine Edits raus) |
||
Zeile 12: | Zeile 12: | ||
rctype: "edit|new", | rctype: "edit|new", | ||
rcnamespace: "0|6|106|108|112", | rcnamespace: "0|6|106|108|112", | ||
+ | rcshow: "!minor|!bot", | ||
format: "xml" | format: "xml" | ||
}, | }, |
Version vom 12. Oktober 2011, 12:50 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;
console.log(title,clowd_prio[title]);
jQuery("#"+id).css("font-size", (1+Math.log(clowd_prio[title]))*100 + "%");
jQuery("#"+id).css("line-height","100%");
}
});
}
});
});