In today's world,
User:MusikAnimal/previewUserboxes.js is a topic that has captured the attention of people of all ages and backgrounds. Over time,
User:MusikAnimal/previewUserboxes.js has gained relevance in different areas, from politics and economics to culture and society. No matter if it is a technological advance, a historical event, a public figure or any other aspect,
User:MusikAnimal/previewUserboxes.js has managed to significantly impact the way we think and act. In this article, we will further explore the impact and importance of
User:MusikAnimal/previewUserboxes.js, as well as its implications in today's world.
/*
* Script: PreviewUserboxes.js
* Author: en:User:MusikAnimal
*
* Notes: This script only shows userboxes that are less than 2500 bytes in size
* This is because some users frustratingly put userboxes categories on their user page (many times unintentional)
*
*/
if(mw.config.get('wgCategories').indexOf("Userboxes") > -1 || mw.config.get('wgPageName') === "Category:Userboxes") {
// showUserboxes = function() {
var boxes = $("#mw-pages").find(".mw-content-ltr").find("a");
$.each(boxes,function(i,box){
$.get(mw.config.get('wgScriptPath')+"/api.php?format=json&action=parse&prop=text&page="+box.text,function(data){
// if(box.text === "Template:User old") debugger;
if(data.parse) {
var $userbox = $(data.parse.text).eq(0);
if($userbox.html().length < 2500 && $userbox.hasClass("wikipediauserbox")) {
$html = "<div>" + $(data.parse.text).eq(0).html() + "</div>" +
"<div style='clear:both;margin-bottom:10px'>{{<a href='"+mw.config.get('wgScriptPath')+"/index.php?title="+box.text+"'>"+box.text+"</a>}}</div>";
$(box).parent().html($html);
}
}
});
});
// }
}