MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

//********************************************************\\ //***Admin Background Colors for Forums and Message Walls***\\ //************************************************************\\

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Areades"]').length; }).next.css({    background: "rgba(129, 190, 247, 0.75) url('http://img2.wikia.nocookie.net/__cb20140625215453/lotrminecraftmod/images/0/03/Admin1_120.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="SamwiseFilmore"]').length; }).next.css({    background: "rgba(208, 112, 48, 0.75) url('http://img2.wikia.nocookie.net/__cb20140625215453/lotrminecraftmod/images/0/03/Admin1_120.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Thorin11"]').length; }).next.css({    background: "rgba(167, 178, 0, 0.75) url('http://img2.wikia.nocookie.net/__cb20140625215453/lotrminecraftmod/images/0/03/Admin1_120.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="LOTRMod"]').length; }).next.css({    background: "rgba(206, 180, 78, 0.85) url('http://img4.wikia.nocookie.net/__cb20141225003527/lotrminecraftmod/images/thumb/4/4e/Modcreator.png/250px-Modcreator.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Handles-081"]').length; }).next.css({    background: "rgba(0, 204, 255, 0.75) url('http://img2.wikia.nocookie.net/__cb20140625215453/lotrminecraftmod/images/0/03/Admin1_120.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Glflegolas"]').length; }).next.css({    background: "rgba(56, 124, 68, 0.75) url('http://img2.wikia.nocookie.net/__cb20140625215453/lotrminecraftmod/images/0/03/Admin1_120.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Gen._Grievous1138"]').length; }).next.css({    background: "rgba(220, 20, 60, 0.80) url('http://img2.wikia.nocookie.net/__cb20140625215453/lotrminecraftmod/images/0/03/Admin1_120.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Sinthoniel"]').length; }).next.css({    background: "rgba(255, 127, 0, 0.75) url('http://img2.wikia.nocookie.net/__cb20140625215453/lotrminecraftmod/images/0/03/Admin1_120.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Beijing1000"]').length; }).next.css({    background: "rgba(136, 209, 136, 0.75) url('http://img2.wikia.nocookie.net/__cb20140625215453/lotrminecraftmod/images/0/03/Admin1_120.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Glaerdir"]').length; }).next.css({    background: "rgba(249, 98, 165, 0.75) url('http://img2.wikia.nocookie.net/__cb20140625215453/lotrminecraftmod/images/0/03/Admin1_120.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Thorin_Stonehelm"]').length; }).next.css({    background: "rgba(7, 21, 212, 0.75) url('http://img2.wikia.nocookie.net/__cb20140625215453/lotrminecraftmod/images/0/03/Admin1_120.png') bottom center no-repeat",    padding: '10px' });

//***********************************************************\\ //***Moderator Background Colors on Forums and Message Walls***\\ //***************************************************************\\

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Seb_TheDunlending"]').length; }).next.css({    background: "rgba(73, 199, 30, 0.70) url('http://img2.wikia.nocookie.net/__cb20141205133613/lotrminecraftmod/images/d/d1/Mod.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Commandogregor1234"]').length; }).next.css({    background: "rgba(189, 51, 164, 0.70) url('http://img2.wikia.nocookie.net/__cb20141205133613/lotrminecraftmod/images/d/d1/Mod.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Edacnik"]').length; }).next.css({ /*old color: rgba(255, 26, 26, 0.70)*/    background: "rgba(0, 0, 0, 0.80) url('http://img2.wikia.nocookie.net/__cb20141205133613/lotrminecraftmod/images/d/d1/Mod.png') bottom center no-repeat !important",    padding: '10px',    color: "#ffffff" });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="EpicSpacePanda"]').length; }).next.css({    background: "rgba(14, 199, 159, 0.70) url('http://img2.wikia.nocookie.net/__cb20141205133613/lotrminecraftmod/images/d/d1/Mod.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Ffets"]').length; }).next.css({    background: "rgba(196, 232, 46, 0.70) url('http://img2.wikia.nocookie.net/__cb20141205133613/lotrminecraftmod/images/d/d1/Mod.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Narvin"]').length; }).next.css({    background: "rgba( 36, 160, 208, 0.70) url('http://img2.wikia.nocookie.net/__cb20141205133613/lotrminecraftmod/images/d/d1/Mod.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Smaug_the_Tyrannical"]').length; }).next.css({    background: "rgba(204, 172, 0, 0.70) url('http://img2.wikia.nocookie.net/__cb20141205133613/lotrminecraftmod/images/d/d1/Mod.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Special_Elf_Friend"]').length; }).next.css({    background: "rgba(0, 206, 209, 0.70) url('http://img2.wikia.nocookie.net/__cb20141205133613/lotrminecraftmod/images/d/d1/Mod.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="CaptCaptain"]').length; }).next.css({    background: "rgba(0, 204, 255, 0.70) url('http://img2.wikia.nocookie.net/__cb20141205133613/lotrminecraftmod/images/d/d1/Mod.png') bottom center no-repeat",    padding: '10px' });

//**********************************************************\\ //***Server and FB Staff Colors on Forums and Message Walls***\\ //**************************************************************\\

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Joetatoe"]').length; }).next.css({    background: "rgba(83, 119, 230, 0.70) url('http://img2.wikia.nocookie.net/__cb20141205133613/lotrminecraftmod/images/d/d1/Mod.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Aidansebastian"]').length; }).next.css({    background: "rgba(0, 200, 0, 0.70) url('http://img2.wikia.nocookie.net/__cb20141205133613/lotrminecraftmod/images/d/d1/Mod.png') bottom center no-repeat",    padding: '10px' });

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="Arantoer"]').length; }).next.css({    background: "rgba(255, 255, 0, 0.70) url('http://img2.wikia.nocookie.net/__cb20141205133613/lotrminecraftmod/images/d/d1/Mod.png') bottom center no-repeat",    padding: '10px' });

//*********************************************************************\\ //***Temporary Moderator Background Colors on Forums and Message Walls***\\ //*************************************************************************\\

$('.speech-bubble-avatar') .filter(function {    return $(this).has('a[href$="TomtheBom"],a[href$="Rocket_Engineer"],a[href$="Recneps"],a[href$="Dinopizzagamer"],a[href$="GimliBurper"],a[href$="High_Prince_Imrahil"]').length; }).next.css({    background: "rgba(205, 192, 176, 0.66) url('http://vignette2.wikia.nocookie.net/lotrminecraftmod/images/b/b2/Temp_mod_tag_3.png/revision/latest?cb=20150605193955') bottom center no-repeat",    padding: '10px' });

//********************************************\\ //** Worldmap (Template:MiddleEarthMap) [WIP] **\\ //************************************************\\ /* $("img").filter(function {   return $(this).attr("usemap") !== null; }).attr("width", 800).attr("height", 1000); var mapname = $("map").attr("name"); $("div .worldmap").appendto(   ' ' );