User:Klintrin/chat.js

$('head').append('#partyTrigger, #partyMenuButton{margin:0 !important;font-size:16px;cursor:pointer;vertical-align:top;color:white;}#partyTrigger{padding:0 10px;}#ChatHeader::selection{display:none;}#ChatHeader:-moz-selection{display:none;} ');

navigator.info= (function{   var N= navigator.appName, ua= navigator.userAgent, tem;    var M= ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);    if(M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1];    M= M? [M[1], M[2]]: [N, navigator.appVersion, '-?'];

return M; });

if (navigator.info[0] == "Chrome" || "Safari" || "Opera") { $('#ChatHeader .public').append('Party Mode'); } else if (navigator.info[0] == "MSIE" && navigator.info[1] == "10.0") { $('#ChatHeader .public').append('Party Mode'); } else if (navigator.info[0] == "Firefox" && navigator.info[1] >= "5.0") { $('#ChatHeader .public').append('Party Mode'); }

$.get('/index.php', {action: 'raw', title: 'User:' + wgUserName + '/Party-link'}, function success(data) { window.customLink = data;});

$('#partyTrigger').toggle(function {	$('.ChatWindow').append('          <div class="light yellow" style="top: 65%; -webkit-animation: lights 6s linear 0.5s infinite; background: white; box-shadow: 0 0 10px 10px white;"> <div class="light blue" style="top: 65%; -webkit-animation: lights 6s linear 2.5s infinite; background: white; box-shadow: 0 0 10px 10px white;"> <div class="light orange" style="top: 65%; -webkit-animation: lights 6s linear 4.5s infinite; background: white; box-shadow: 0 0 10px 10px white;"> <div class="light red" style="top: 85%; -webkit-animation: lights 6s linear 1.5s infinite; background: white; box-shadow: 0 0 10px 10px white;"> <div class="light green" style="top: 85%; -webkit-animation: lights 6s linear 3.5s infinite; background: white; box-shadow: 0 0 10px 10px white;"> <div class="light yellow" style="top: 85%; -webkit-animation: lights 6s linear 5.5s infinite; background: white; box-shadow: 0 0 10px 10px white;">  <source src="' + customLink + '" type="audio/ogg"> <style type="text/css">.ChatWindow,#Rail .selected{background-color:black !important;background-image:-moz-linear-gradient(top,rgb(30,30,30) 0%,black 100%) !important;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,rgb(30,30,30)),color-stop(100%,black)) !important;background-image:-webkit-linear-gradient(top,rgb(30,30,30) 0%,black 100%) !important;background-image:-o-linear-gradient(top,rgb(30,30,30) 0%,black 100%) !important;background-image:-ms-linear-gradient(top,rgb(30,30,30) 0%,black 100%) !important;background-image:linear-gradient(to bottom,rgb(30,30,30) 0%,black 100%) !important;}.WikiaPage{background:rgb(15,15,15)}.Chat .you{background:rgb(20,20,20)}.Write .message{background:rgb(15,15,15) !important;border-color:rgb(30,30,30) !important}.Write textarea{color:white !important}.Chat span{color:white}#ChatHeader{background-color:#305599 !important;background-image:-moz-linear-gradient(top,#3966B7 0%,#27447B 100%) !important;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#3966B7),color-stop(100%,#27447B)) !important;background-image:-webkit-linear-gradient(top,#3966B7 0%,#27447B 100%) !important;background-image:-o-linear-gradient(top, #3966B7 0%,#27447B 100%) !important;background-image:-ms-linear-gradient(top, #3966B7 0%,#27447B 100%) !important;background-image:linear-gradient(to bottom,#3966B7 0%,#27447B 100%) !important;}.User{color:rgb(195, 195, 195);}#partyMenuButton.active span{background-image:-moz-linear-gradient(top,#27447B 0%,#3966B7 100%) !important;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#27447B),color-stop(100%,#3966B7)) !important;background-image:-webkit-linear-gradient(top,#27447B 0%,#3966B7 100%) !important;background-image:-o-linear-gradient(top,#27447B 0%,#3966B7 100%) !important;background-image:-ms-linear-gradient(top,#27447B 0%,#3966B7 100%) !important;background-image:linear-gradient(to bottom,#27447B 0%,#3966B7 100%) !important;}#ChatHeader .public.wordmark a:hover{background-image:-moz-linear-gradient(top,#4572C5 0%,#2D4F8E 100%) !important;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#4572C5),color-stop(100%,#2D4F8E)) !important;background-image:-webkit-linear-gradient(top,#4572C5 0%,#2D4F8E 100%) !important;background-image:-o-linear-gradient(top, #4572C5 0%,#2D4F8E 100%) !important;background-image:-ms-linear-gradient(top, #4572C5 0%,#2D4F8E 100%) !important;background-image:linear-gradient(to bottom,#4572C5 0%,#2D4F8E 100%) !important;}#ChatHeader .public.wordmark a.active:hover{background-image:none !important;background-color:transparent !important;}#ChatHeader .public.wordmark a:active, #ChatHeader .public #partyMenuButton.active span:hover{background-image:-moz-linear-gradient(top,#2D4F8E 0%,#4572C5 100%) !important;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#2D4F8E),color-stop(100%,#4572C5)) !important;background-image:-webkit-linear-gradient(top,#2D4F8E 0%,#4572C5 100%) !important;background-image:-o-linear-gradient(top, #2D4F8E 0%,#4572C5 100%) !important;background-image:-ms-linear-gradient(top, #2D4F8E 0%,#4572C5 100%) !important;background-image:linear-gradient(to bottom,#2D4F8E 0%,#4572C5 100%) !important;}#partyMenu{background:#3966B7;border-radius:0 10px 10px;padding:5px;position:absolute;z-index:1;cursor:default;min-width:250px;}#partyMenu li{list-style:none;border-radius:10px;padding:0px 10px;font-size:14px;cursor:pointer;}#partyMenu li:hover{font-weight:bold;}#partyMenu li.selected{background:#27447B; font-weight: bold; cursor: default;}#partyMenu li.selected::before{content:"? ";}#option-5::before{content:"? ";}#partyMenuButton span{padding:11px 10px;}.light{position:fixed;width:50px;height:50px;border-radius:100%;opacity:.4;left:-70px;z-index:10;}@-webkit-keyframes lights{from{left:100%;}to{left:-70px;}}#Rail .User:hover{background:#27447B !important;} ');	$('#ChatHeader .public').append(' Settings <ul><li id="option-1" class="selected">Dynamite - Taio Cruz</li><li id="option-2">Good Time - Owl City ft Carly Rae Jepson</li><li id="option-3">Daybreak - Barry Manilow</li><li id="option-4">Custom</li><li id="option-5">None</li></ul><form style="background: #27447B; border-radius: 10px; padding: 0 10px; font-size: 14px; margin-top: 5px;"><p style="margin-bottom: -15px; font-weight: bold;">Customize Lights <input type="radio" id="white" name="lights" value="white" checked="checked" />White<input type="radio" id="colored" name="lights" value="colored" />Colored<input type="radio" id="off" name="lights" value="off" />Off </a>'); $('#partyMenuButton span').click(function {		$('#partyMenuButton').toggleClass('active');		$('#partyMenu').toggle; }	); $('#partyMenu li').click(function {		$('#partyMenu li').removeClass('selected');		$(this).addClass('selected'); }	); $('#white').click(function {		$('#discoBall').show;		$('.light').css({'background':'white','boxShadow':'0 0 10px 10px white'}); }	); $('#colored').click(function {		$('#discoBall').show;		$('.light.blue').css({'background':'blue','boxShadow':'0 0 10px 10px blue'});		$('.light.orange').css({'background':'orange','boxShadow':'0 0 10px 10px orange'});		$('.light.red').css({'background':'red','boxShadow':'0 0 10px 10px red'});		$('.light.green').css({'background':'green','boxShadow':'0 0 10px 10px green'});		$('.light.yellow').css({'background':'yellow','boxShadow':'0 0 10px 10px yellow'}); }	); $('#off').click(function {		$('#discoBall').hide; }	); }, function { $('#partyMode, #partyMenuButton').remove; } );