Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @description Keeps newly-unfolded comments highlighted, to easily distinguish them from higher-scoring comments you've already read
// @author CertainPerformance
// @namespace https://github.com/CertainPerformance/Stack-Exchange-Userscripts
// @version 1.0.6
// @version 1.0.7
// @include /^https://(?:[^/]+\.)?(?:(?:stackoverflow|serverfault|superuser|stackexchange|askubuntu|stackapps)\.com|mathoverflow\.net)/(?:questions/\d|review/\w(?!.*/stats|.*/history))/
// @grant none
// ==/UserScript==
Expand Down Expand Up @@ -57,7 +57,9 @@ const observeContainer = (commentsContainer) => {
}
for (const comment of newComments) {
window.setTimeout(() => {
const highlightColor = document.body.matches('.theme-dark')
const highlightColor =
document.body.matches('.theme-system') && window.matchMedia('(prefers-color-scheme: dark)').matches ||
document.body.matches('.theme-dark')
? '#403d33' // Dark brown, close to default dark background
: '#fff2e0'; // Pale yellow, close to default light background
// eslint-disable-next-line no-param-reassign
Expand Down