MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */ // switched to Wikia's new method //importScriptPage( 'ShowHide/code.js', 'dev' ); //importScriptPage('AjaxBatchDelete/code.js', 'dev'); importScript('User:Quarenon/massrollback.js'); //importScriptPage('BackToTopButton/code.js', 'dev'); ////deprecated ////importScriptPage('User:Mfaizsyahmi/poll.js', 'hitlerparody'); //importScriptPage('CollapsibleEdittools/code.js', 'dev'); //importScriptPage('DupImageList/code.js', 'dev'); //importScriptPage('User:Jgjake2/js/DISPLAYTITLE.js', 'deadisland'); // switching to Wikia's new method importArticles({   type: "script",    articles: [        "w:c:dev:ShowHide/code.js",        "w:c:dev:AjaxBatchDelete/code.js",        "w:c:dev:BackToTopButton/code.js",        "w:c:dev:CollapsibleEdittools/code.js",        "w:c:dev:DupImageList/code.js",        "w:c:deadisland:User:Jgjake2/js/DISPLAYTITLE.js"        "User:Mfaizsyahmi/UntergangerAJAX.js"    ] });

// SocialBlade Widget (now supports multiple tags) $('.SocialBladeWidget').each(function {   var sbname=$(this).text;    $(this).html(' '); });

//Because everyone wants to add their YT channel link in the List of Untergangers, //This block of code will do it for all unfilled ones //+Code to add tooltip to the figure columns (vids, views, subs) $("table.untergangers tr").each(function(idx){

// Add flag to country column ctry = $("td:nth-child(4)",this).text; $("td:nth-child(4)",this).html(' '+ctry+' ');

//add tooltips to the figure columns $("td:nth-child(5)",this).attr("title","Uploaded parodies"); $("td:nth-child(6)",this).attr("title","Total views"); $("td:nth-child(7)",this).attr("title","Subscriber count");

//Checking if the last cell has less than 3 characters //(they are absolutely not empty) if ($("td:last-child", this).text.length < 3 ) {

// Getting the unterganger's yt channel from the name column // (for multi-word entries the first one MUST be the yt name) channelname = $("td:nth-child(2)", this).text.split(" ")[0];

// Check to see if Status column contain "Suicide" statscol =$("td:nth-child(8)", this).text; if (statscol.search("Suicide") == -1) {

//adding the link to the YT column... $("td:last-child", this).html('yt'); }   }

// now that we added yt links on non-suicidal channels.. if ($("td:last-child", this).text.length >= 2 ) {

// retrieve channelname from url if empty if (channelname == '') channelname = $("td:last-child a", this).attr("href").split("/user/")[1];

// check if channel is undefined (Das Reich's case) // then place an invisible div holding channelname if (typeof channelname !== 'undefined') $("td:last-child", this).append(''+channelname+' ');

// Add button to update stats using AJAX // (requires User:Mfaizsyahmi/UntergangerAJAX.js) $("td:nth-child(2)",this).append(' [ update ] '); });   }   });

// I want to put stuff directly beneath the infobox! :@ $(".infobox").wrap(' '); $(".underinfobox").appendTo(".infoboxcolumn");

// Marquee text, might come in handy for main page announcements $('div.marquee').wrapInner(' ');

/* the following code allows you to append HTML to every page */ // $('body').append('HTML here');

// moved here as this should be applied last... $('a.external').attr({ target: '_blank' });

/* ************************ From the Jodl Files ************************* */ // something for rob and his hobo piret ;) // $(".page-Notoriousrob01, .page-PiretBCN, .page-Downfall_Parody_Awards").append('  '); // remind me to remove these later as well // brainslayer autoplaying in mainpage. remember: the TTS folks are right! // $('table.mainslider div.WikiaPhotoGalleryPreview').replaceWith(' ');