From a0f680c02a7256ef7f0981c38e796d1113ff8bbb Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Thu, 15 Oct 2026 00:05:42 -0400 Subject: [PATCH] Fixed visual bugs with 'The Network' theme. --- www/css/theme/the-network-classic.css | 16 ++++++++++------ www/js/channel/chatPostprocessor.js | 8 ++++++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/www/css/theme/the-network-classic.css b/www/css/theme/the-network-classic.css index 395cf57..6a4d8ac 100644 --- a/www/css/theme/the-network-classic.css +++ b/www/css/theme/the-network-classic.css @@ -445,17 +445,21 @@ p.channel-guide-entry-item{ box-shadow: var(--focus-glow0-alt0-inset-top); } -.serverwhisper, .chat-entry-toke{ - background-color: var(--bg1); - margin: 0; - padding: 0.2em 0; +.chat-entry-tokewhisper, .chat-entry-serverwhisper{ + background-color: var(--bg2-alt1); } -.chat-entry:nth-child(even):not(.chat-entry-toke){ +.serverwhisper, .chat-entry-toke{ + background-color: var(--bg2-alt1); + margin: 0; + padding: 0.2em 0.1em; +} + +.chat-entry:nth-child(even):not(.chat-entry-toke, .chat-entry-serverwhisper, .chat-entry-tokewhisper){ background-color: var(--bg0); } -.chat-entry:nth-child(odd):not(.chat-entry-toke){ +.chat-entry:nth-child(odd):not(.chat-entry-toke, .chat-entry-serverwhisper, .chat-entry-tokewhisper){ background-color: var(--bg1-alt0); } diff --git a/www/js/channel/chatPostprocessor.js b/www/js/channel/chatPostprocessor.js index 84b2e55..ccd6ed6 100644 --- a/www/js/channel/chatPostprocessor.js +++ b/www/js/channel/chatPostprocessor.js @@ -664,9 +664,13 @@ class chatPostprocessor{ //add whisper class this.chatBody.classList.add('whisper'); }else if(this.rawData.type == "announcement"){ - //Squash the high-level & timestamp + //Squash the high-level this.chatEntry.querySelector('.high-level').remove(); - this.chatEntry.querySelector('.chat-entry-timestamp').remove(); + //If the user is displaying timestamps + if(localStorage.getItem('nameplateFormat') == "timestamp"){ + //Remove the timestamp from the chat entry + this.chatEntry.querySelector('.chat-entry-timestamp').remove(); + } //Get the username and make it into an announcement title (little hacky but this *IS* postprocessing) const userNode = this.chatEntry.querySelector('.chat-entry-username');