MediaWiki:Wikia.js

importScriptPage('MediaWiki:Wikia.js/cancelButton.js', 'admintools'); importScriptPage('InactiveUsers/code.js', 'dev'); importScriptPage('SpoilerAlert/code.js', 'dev'); importScriptPage('BackToTopButton/code.js', 'dev'); importScriptPage('ShowHide/code.js', 'dev'); importScriptPage('EditIntroButton/code.js', 'dev'); importScriptPage('AjaxRC/code.js', 'dev'); importScriptPage('SignatureCheck/code.js', 'dev'); importScript('MediaWiki:Wikia.js/editCount.js'); importScript('MediaWiki:Wikia.js/Ticker.js'); importScript('MediaWiki:Common.js/userRightsIcons.js'); var ShowHideConfig = { autoCollapse: 3, en: { show: "show", hide: "hide", showAll: "expand all", hideAll: "collapse all" } }; ajaxPages = ["Special:WikiActivity","Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions","Special:Forum"]; AjaxRCRefreshText = 'Auto-refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; importScriptPage('AjaxRC/code.js', 'dev'); 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'); } window.SpoilerAlert = { isSpoiler: function { return -1 != $.inArray('Spoiler', wgCategories); } };

/* User Rights Icons */ function addMastheadTags { var rights = {}; // Administrators rights["Yuzura"] = ["Administrator","Bureaucrat"], rights["PaperScarf"] = ["Administrator","Bureaucrat","Inactive"], // Rollbacks rights["ZimFan"]   = ["Rollback","Chat Moderator"], // Chat Mods rights[" "]      = ["Chat Moderator"], 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'); }   } }; $(function {  if ($('#UserProfileMasthead')) {    addMastheadTags;  } });