MediaWiki:Wikia.js

//Custom user rights icons on userpages importScript('MediaWiki:Wikia.js/userRightsIcons.js');

importScriptPage('RelatedDiscussionsModule/code.js', 'dev');

function addMastheadTags { var rights = {}; // BEGIN List of Accounts Given Extra User Rights Icons - Must list all tags

rights["NinjaFatGuy"] = ["Head Admin"]; rights["DoubleDeeEddBoy"] = ["Head Admin"]; rights["Jackninja5DipperGravityFalls"] = ["Head Admin"]; rights["Nintendogeek5999"] = ["Head Admin"]; rights["Skand_and_Jonny_Fan"] = ["Head Admin"]; rights["Skeleton3"] = ["Head Admin"]; rights["OishiLover75"] = ["Bureaucrat"]; rights["DiscoDuck"] = ["Bureaucrat"]; // END List of Accounts Given Extra User Rights Icons // BEGIN Script to Remove Old Rights Icons & Insert New if (wgCanonicalSpecialPageName == "Contributions") { var user = wgPageName.substring(wgPageName.lastIndexOf("/")+1).replace(/_/g," "); } else { var user = wgTitle; } if (typeof rights[user] != "undefined") { // remove old rights $('.UserProfileMasthead .masthead-info span.tag').remove; for( var i=0, len=rights[user].length; i < len; i++) { // add new rights $('' + rights[user][i] +         ' ').appendTo('.masthead-info hgroup'); }   }  // END Script to Remove Old Rights Icons & Insert New };

/** Automatically drops down the menu when you hover the edit button **/

importArticles({   type: 'script',    articles: [        'w:c:dev:AutoEditDropdown/code.js'    ] });

// Namespaces in header $(function NamespacesInHeader {	if(wgCanonicalNamespace != '' && wgCanonicalNamespace != 'Talk') {		$('#WikiaPageHeader h1').html(wgFormattedNamespaces[wgNamespaceNumber] + ':' + wgTitle);	} });

//Get rid of disgusting popup image uploader $(".upphotos").click(function linkToUploader {  window.location.href='http://callofduty.wikia.com/wiki/Special:Upload'; });

/* */ /* Fixes user wikia.js and wikia.css files not loading in Oasis after upgrade to MediaWiki 1.19 (from rs.wikia.com) */ if (!$('script[src*="title=User:'+wgUserName+'/wikia.js"]').length) { importScript('User:' + wgUserName + '/wikia.js'); } if (!$('link[href*="title=User:'+wgUserName+'/wikia.css"]').length) { importStylesheet('User:' + wgUserName + '/wikia.css'); }

/* */

importArticles({   type: "script",    articles: [        //"MediaWiki:Wikia.js/socialIcons.js",        "u:dev:DupImageList/code.js"    ] });