User:HM100/chat.js

//Switch to night button var ccs2_button = 'Candy Crush Saga Fanon Colors'; //Switch to day button var ccs_button = 'Default Colors'; // //Color scheme for DAY Chat // //Link color var linkColorCCS = '#6f027c'; //All text Color var textColorCCS = '#3a3a3a'; //Self text background color var selfTextColorCCS = '#f7f7f7'; //Chat background color var backgroundColorCCS = '#ffffff'; //Chat foreground color var foregroundColorCCS = '#e995ca'; //User stats foreground color var userStatsColorCCS = 'Silver'; //END DAY Chat color scheme // //Color scheme for NIGHT Chat // //Link color var linkColorCCS2 = '#337800'; //All text Color var textColorCCS2 = '#3a3a3a'; //Self text background color var selfTextColorCCS2 = '#deebca'; //Chat background color var backgroundColorCCS2 = '#361255'; //Chat foreground color var foregroundColorCCS2 = '#c3d167'; //User stats foreground color var userStatsColorCCS2 = 'Silver'; //END NIGHT Chat color scheme

//CCS and night color schemes //Written by Foodbandlt function addCCSStyle { var styleElementCCS = document.createElement('style'); styleElementCCS.setAttribute("id", "ccs"); styleElementCCS.innerHTML = 'body{background: ' + backgroundColorCCS + ';}.username, .message, div.chattopic, .info .edits, .UserStatsMenu .info .since, #ChatHeader h1.private, .Write [name="message"]{color: ' + textColorCCS + ';}.WikiaPage, .UserStatsMenu, .ChatHeader, .Write [name="message"]{background: ' + foregroundColorCCS + ';}.Chat .you{background: ' + selfTextColorCCS + ';}a{color: ' + linkColorCCS + ';}.UserStatsMenu .info{background:' + userStatsColorCCS + ';}'; $('head').append(styleElementCCS); } function addCCS2Style { var styleElement = document.createElement('style'); styleElement.setAttribute("id", "ccs2"); styleElement.innerHTML = 'body{background: ' + backgroundColor + ';}.username, .message, div.chattopic, .info .edits, .UserStatsMenu .info .since, #ChatHeader h1.private, .Write [name="message"]{color: ' + textColor + ';}.WikiaPage, .UserStatsMenu, .ChatHeader, .Write [name="message"]{background: ' + foregroundColor + ';}.Chat .you{background: ' + selfTextColor + ';}a{color: ' + linkColor + ';}.UserStatsMenu .info{background:' + userStatsColor + ';}'; $('head').append(styleElement); } function addCCSCCS2Button { if ($('.ccs-ccs2-div').size === 0) { $('' + ccs2_button + ' ').prependTo('.Rail'); }   if ($('style#ccs2').size === 0 && $('style#ccs2User').size === 0) { addCCSStyle; } } function ccs_ccs2(which) { if (which == "ccs2") { $('style#ccs').remove; $('.Rail .ccs-ccs2-div .ccs-ccs2-button').text(ccs_button); addCCS2Style; } else { $('style#ccs2').remove; $('.Rail .ccs-ccs2-div .ccs-ccs2-button').text(ccs2_button); addCCSStyle; } } function switch_view { if ($('.Rail .ccs-ccs2-div .ccs-ccs2-button').text == ccs2_button) { ccs_ccs2("ccs2"); } else { ccs_ccs2("ccs"); } } if ($('.Rail .ccs-ccs2-div').size === 0) { addCCSCCS2Button; }