User:Dr. Frohman/chat.js

//Switch to night button var night_button_user = 'Night'; //Switch to day button var day_button_user = 'Day'; // //Color scheme for Night Chat // //Link color var linkColorUser = '#4e95ff'; //All text Color var textColorUser = '#FFFFFF'; //Self text background color var selfTextColorUser = '#00609d'; //Chat background color var backgroundColorUser = '#c8deff'; //Chat foreground color var foregroundColorUser = '#86a2f7'; //User stats foreground color var userStatsColorUser = '#0f50B0'; //END Night Chat color scheme //Night themed chat //Written by Foodbandlt function addDayNightButtonUser{ $(''+night_button_user+' ').prependTo('.Rail'); } function day_night_user{ $('style#night').remove; var styleElementUser = document.createElement('style'); styleElementUser.setAttribute("id", "nightUser"); styleElementUser.innerHTML='body{background-color: '+backgroundColorUser+';}.username, .message, div.chattopic, .info .edits, .UserStatsMenu .info .since, #ChatHeader h1.private, .Write [name="message"]{color: '+textColorUser+';}.WikiaPage, .UserStatsMenu, .ChatHeader, .Write [name="message"]{background-color: '+foregroundColorUser+';}.Chat .you{background: '+selfTextColorUser+';}a{color: '+linkColorUser+';}.UserStatsMenu .info{background-color:'+userStatsColorUser+';}'; $('head').append(styleElementUser); } function switch_view_user{ if ($('.Rail .day-night-div-user .day-night-button-user').text == night_button_user){ $('.Rail .day-night-button-user').text(day_button_user); day_night_user; }else{ $('.Rail .day-night-div-user .day-night-button-user').text(night_button_user); $('style#nightUser').remove } } if ($('.Rail .day-night-button-user').text == ""){ addDayNightButtonUser; } while ($('.day-night-div').size > 0 || $('.clearChatText').size > 0){ $('.day-night-div').remove $('.clearChatText').remove } while ($('.clearChatText').size > 0){ $('.clearChatText').remove } function embedObject{ $(' Radio Player   ').appendTo('h1.public.wordmark'); } embedObject; while ($('.Rail .day-night-div-user').size > 1){ $('.WikiaPage .Rail div:last-child').remove } if ($('.Radio').size > 1){ $('h1.public.wordmark div:last-child').remove;