Katrins/chat.js
< User:Katrins
10,239pages on
this wiki
this wiki
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Chrome - Windows: Hold the Ctrl key and press the F5 key. OS X: Hold both the ⌘ Cmd and ⇧ Shift keys and press the R key.
- Safari - Hold down the ⇧ Shift key and click the Reload toolbar button.
- Firefox - Windows: Hold the Ctrl key, and press F5. OS X: Hold the ⌘ Cmd and ⇧ Shift keys, and then press R.
- Internet Explorer - Hold the Ctrl key, and press F5 (or click the Refresh button).
//Switch to night button var night_button_user = 'Katrins Theme'; //Switch to day button var day_button_user = 'Default Chat Theme'; // //Color scheme for Night Chat // //Link color var linkColorUser = 'deeppink'; //All text Color var textColorUser = 'deeppink'; //Self text background color var selfTextColorUser = '#000000'; //Chat background color var backgroundColorUser = 'deeppink'; //Chat foreground color var foregroundColorUser = '#000000 '; //User stats foreground color var userStatsColorUser = '#000000'; //END Night Chat color scheme //Night themed chat //Written by Foodbandlt function addDayNightButtonUser(){ $('<div class="day-night-div-user" onclick="switch_view_user()" style="margin: 10px auto; text-align: center; cursor: pointer;"><a class="day-night-button-user wikia-button">'+night_button_user+'</a></div>').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').size() < 1){ addDayNightButtonUser(); } while ($('.day-night-div').size() > 0){ $('.day-night-div').remove() } while ($('.Rail .day-night-div-user').size() > 1){ $('.WikiaPage .Rail div:last-child').remove() }