MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */ //For Skype button $(function {    $('.jscustomlink').each(function  { var $span = $(this), href = $span.attr('data-href'), title, target, a;       if (typeof href === "string" && href.length !== 0) { title = $span.attr('data-title'); target = $span.attr('data-target'); a = document.createElement("a"); a.href = href; a.textContent = $span.text; console.log(title); if (typeof title === "string" && title.length !== 0) { a.setAttribute("title", title); }           if (typeof target === "string" && target.length !== 0) { a.setAttribute("target", target); }           $span.empty; $span.html(a); }   }); }); // Auto refresh importScriptPage('AjaxRC/code.js', 'dev'); var ajaxPages        = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions","Special:WikiActivity"]; var AjaxRCRefreshText = 'Auto-refresh';

// UserTags window.UserTagsJS = { modules: {}, tags: { bureaucrat:     {f:'Conception Grandmaster', order:-1/0}, founder:        {u:'The Creator', order:-1/0}, rollback:       {u:'Conception Guardian', order:2}, programmer:     {u:'Hacker', order:3}, critic:         {u:'Critic', order:1/0}, artist:         {u:'Artist', order:2/0}, coder:          {u:'Coder', order:3/0}, publicist:      {u:'Publicist', order:4/0}, bot:            {u:'Bot', order:8/0}, threadmoderator: {u:'Thread Moderator'}, chatmoderator:  {u:'Laboratory Operator'}, labguard:       {u:'Laboratory Guardian'}, sergeant:       {u:'Conception Master Sergeant'} },       oasisPlaceBefore: '' }; UserTagsJS.modules.newuser   = true; UserTagsJS.modules.inactive  = 10; UserTagsJS.modules.metafilter = { 'bureaucrat': ['founder'], 'sysop': ['bureaucrat'], }; UserTagsJS.modules.mwGroups = ['bureaucrat', 'founder', 'rollback', 'threadmoderator', 'chatmoderator', 'programmer', 'bot', 'publicist', 'coder', 'critic', 'artist']; UserTagsJS.modules.implode = { 'bot': ['bot2', 'sysop'], 'labguard': ['rollback', 'chatmoderator'], 'sergeant': ['labguard', 'threadmoderator'], }; //A user has a "New Editor" tag until UserTagsJS.modules.newuser = { days: 14, edits: 100 }; //Adds custom usertags UserTagsJS.modules.custom = { 'Btd456Creeper':       ['critic'], 'CyberGuy23':          ['founder'], 'Derpinator9001':      ['artist'], 'Forgotten Madness':   ['artist'], 'ItsBloonTasty':       ['critic', 'coder'], 'Kamarin':             ['artist'], 'Logologologol':       ['bureaucrat', 'programmer', 'critic', 'artist'], 'LoverofAllThingsCute': ['critic'], 'Mr.OAH':              ['artist'], 'Nixxx60':             ['coder'], 'Planterobloon':       ['rollback'], }; // End of UserTags // Replaces with the name of the user browsing the page function UserNameReplace { if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return; $("span.insertusername").html(wgUserName); } addOnloadHook(UserNameReplace); // End of the replacement //Wall and forum tags window.MessageWallUserTags = { tagColor: '#FF0', glow:     true, glowSize: '15px', glowColor: '#FF0', users: { 'CyberGuy23':          'The Creator', 'Logologologol':       'Conception Grandmaster', 'ItsBloonTasty':       'Conception Master', 'LoverofAllThingsCute': 'Lab Guardian', 'Planterobloon':       'Conception Guardian', 'Doue':                'Lab Operator', 'Kamarin':             'Lab Operator' } };

//Redirect button if (mw.config.get("wgUserGroups").indexOf('sysop') > -1)

// IMPORT importArticles({   type: 'script',    articles: [          "w:c:dev:TimedSlider/code.js",          "w:c:dev:UserTags/code.js",          "w:c:dev:AjaxRC/code.js",          "w:c:dev:Verbatim/code.js",          "w:c:dev:Countdown/code.js",          "u:dev:DisplayClock/code.js",          "u:dev:MessageWallUserTags/code.js",          "u:dev:AjaxRedirect/code.js",          "u:dev:BackToThread/code.js",          "u:dev:DisableBotMessageWalls/code.js",          "u:dev:DynamicImages/code.js",          "u:dev:ExtendedNavigation/code.js",          "u:dev:FloatingToc/code.js",          "w:c:dev:FontAwesome/code.css",          "u:dev:LuaError/code.js",          "w:c:dev:PurgeBlogs/code.js",    ] });

// Svg avatar hack function updateAvatarsToSvg { $("[src*='px-1841894.png'].avatar").attr("src", "http://images.wikia.com/bloonsconception/images/c/c0/AVA8.svg?cb=" + new Date.getTime); } updateAvatarsToSvg; $("body").on("DOMNodeInserted", "#WikiaRail > section", function {	updateAvatarsToSvg; });

//poweruser checkbox at listusers, creds to 452 if (wgPageName=="Special:ListUsers") $("fieldset.lu_fieldset tr:last-child").prepend('  Power Users ');

importScriptPage('WallGreetingButton/code.js', 'dev'); PurgeButtonText = 'Purge'; importScriptPage('PurgeButton/code.js', 'dev'); importScriptPage('User Rights Reasons Dropdown/code.js', 'dev');