User:SuperSajuuk/wikia.js

// This code tags people on the forums so they can be identified.

// README // 1) This should be added to MediaWiki:Common.js/ForumTags.js (for personal use, add to Special:MyPage/wikia.js) // 2) Copy the code "verbatim". // 3) Additional users can be defined per the syntax in the users: {} parameter in the window.MessageWallUserTags code at the top

window.MessageWallUserTags = { tagColor: 'red', glow: false, glowSize: '15px', glowColor: '#f77', users: { 'UltimateSupreme': 'Sysop · Coder', 'Seelentau': 'Translator · Forum Moderator', 'SuperSajuuk': 'Forum Moderator', 'Ten_Tailed_Fox': 'Sysop', 'Snapper2': 'Sysop', 'FF-Suzaku': 'Translator' } }; (function($, config) {   //Setup configuration options, internal variables, and default values:    var tagColor = config.tagColor || 'red',        glow = config.glow || true, //Text-shadow effect: true/false        glowColor = config.glowColor || '#f77',        glowSize = config.glowSize || '20px', //Text-shadow size in pixels        users = config.users || {}, //List of users to tag and what the tag will say        txtShadow = ''; //Internal text shadow variable — nothing by default    //Set the size and color of the text shadow if it's enabled    if (glow === true) {        txtShadow = '0 0 ' + glowSize + ' ' + glowColor;    }    //Main function    function init {        for (var name in users) {            $('a.subtle[href$="User_talk:' + name + '"]')                .after(' (' + users[name] + ') ');            $('.ForumTags').css({ color: tagColor, marginLeft: '-2px', fontFamily: 'arial', fontSize: '12px', textShadow: txtShadow, verticalAlign: 'top' });       }    }    init; }(jQuery, window.MessageWallUserTags));