View source for User:KamranMackey/common.js
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
/** Infobox collapsing script **/
$(".infoboxBlockImage img").each(function(){
width = parseInt($(this).attr("width"), 10);
if(width > 240){
$(this).attr("height","");
$(this).attr("width","240");
}
});
$(".infobox:not(.infoboxNoCollapse) td").each(function(){
if($(this).html().match(/{{{[^}]+}}}/)) $(this).parent("tr").hide()
});
$(".infobox:not(.infoboxNoCollapse) .infoboxSubsectionBreak, .infobox:not(.infoboxNoCollapse) tr.infoboxSectionHeader").each(function(){
flag = true;
next = $(this).next();
while(next && next != undefined && next.html() != undefined && !next.hasClass("infoboxSubsectionBreak") && !next.hasClass("infoboxSectionHeader")){
if(next.css("display") != "none") flag = false;
//console.info(next.html());
next = next.next();
000
1:0
Return to User:KamranMackey/common.js.