MediaWiki:Vector.js

/* Any JavaScript here will be loaded for users using the Vector skin */

/* Add Curse ads to wiki pages */ //Logged in users don't get ads if (mw.config.get("wgUserName") != null) { $(".curse-ad").css("display","none"); //remove ad from Main Page } else { //Header and footer ads $("#content").prepend("  "); //top banner $("  ").insertAfter( "#mw-content-text" ); //footer rectangle $("#footer").prepend("  "); //bottom banner //In-content ad   var namespace = mw.config.get("wgCanonicalNamespace"); //Once we upgrade to MW 1.23+, wgContentNamespaces should be used instead of hardcoded namespace values. var isContentNamespace = namespace == "" || namespace == "Community"; //the empty string represents the mainspace if(isContentNamespace && mw.config.get("wgIsArticle")) { if(mw.config.get("wgPageName") == "Main_Page") { $("#mf-incontentad").append(" "); }       // Automatically place an ad inside every infobox. If the infobox doesn't exist on that page, create a cheap and simple box for the ad.       else if ($(".infobox-curse-ad").length == 0){ $("#mw-content-text").prepend('  '); }       else { $(document).ready($(".infobox-curse-ad").append('    ')); }   }    //Ads will not function without this before the tag $("body").append(" "); // Requested site class for body $("body").addClass("site-zeldawiki"); }