User:Colonel Aurochs/chat.js

//Switch to night button var night_button_user = 'Switch to Bizzar Chat'; //Switch to day button var day_button_user = 'Switch to Bizaar Chat'; // //Color scheme for DAY Chat // //Link color var linkColorDay = '#F30E00'; //All text Color var textColorDay = '#000000'; //Self text background color var selfTextColorDay = '#000DBA'; //Chat background color var backgroundColorDay = '#650000'; //Chat foreground color var foregroundColorDay = '#0234FF'; //User stats foreground color var userStatsColorDay = '#B90700'; //END DAY Chat color scheme // //Color scheme for Night Chat // //Link color var linkColorUser = '#000099'; //All text Color var textColorUser = '#000000'; //Self text background color var selfTextColorUser = '#CC0000'; //Chat background color var backgroundColorUser = '#0000FF'; //Chat foreground color var foregroundColorUser = '#660000'; //User stats foreground color var userStatsColorUser = '#0033FF'; //END Night Chat color scheme //Night themed chat //Written by Foodbandlt //Screwed around by Bozxaro 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); $('style#day').remove; day_night_user; }else{ $('.Rail .day-night-div-user .day-night-button-user').text(night_button_user); $('style#nightUser').remove addDayStyle; } } 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 } while ($('.Rail .day-night-div-user').size > 1){ $('.WikiaPage .Rail div:last-child').remove } //Clear chat button function addClearChatText{ if ($('.clearChatText').length <= 0) { var clearChatText = document.createElement('span'); $('Clear chat ').prependTo('.Rail'); } } function clearChat{ $('.Chat li').remove; } window.onload=addClearChatText; //END Clear chat button