Open boomzero opened 11 months ago
// Check if the user prefers a dark color scheme
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
// User prefers dark color scheme
console.log('User prefers dark color scheme');
} else {
// User prefers light color scheme
console.log('User prefers light color scheme');
}
我也在这样想
tnnd《提示》
https://github.com/boomzero/quicksubmit
On Dec 23, 2023, at 14:33, Shan Wenxiao @.***> wrote:
tnnd《提示》
— Reply to this email directly, view it on GitHub https://github.com/XMOJ-Script-dev/XMOJ-Script/issues/314#issuecomment-1868221620, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULMJZNFJAEHWEQPH2JMOUTYKZ3MNAVCNFSM6AAAAABA7YXGASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGIZDCNRSGA. You are receiving this because you authored the thread.
这个很简单呀
这个很简单呀
@langningchen 我知道, 但是不知道怎么让用户设置
根據系統設置自動設置
跟随系统设置
那如果用户同时选择暗色模式和这个呢?
On Jan 30, 2024, at 17:21, Langning Chen @.***> wrote:
跟随系统设置
— Reply to this email directly, view it on GitHub https://github.com/XMOJ-Script-dev/XMOJ-Script/issues/314#issuecomment-1916401225, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULMJZKQRNIG36MQ2MGV2BLYRC3QPAVCNFSM6AAAAABA7YXGASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJWGQYDCMRSGU. You are receiving this because you authored the thread.
那么以用户选择为准,用户可以选择:
那么以用户选择为准,用户可以选择:
* Light mode * Dark mode * Same as system settings (Default)
但是不能三个都选
当然了
I wanted to start working on this, but things are so... chaotic, so...
~new OSS project~
小棉袄开始做这个了吗(bushi
笑死我怎么打出来的
那么以用户选择为准,用户可以选择:
* Light mode * Dark mode * Same as system settings (Default)
但是不能三个都选
我不知道如何强制用户三选一
可以写提示,然后… I think I know what to do
跟随系统设置
@langningchen because 三选一
那么以用户选择为准,用户可以选择:
- Light mode
- Dark mode
- Same as system settings (Default)
So:
检查项
描述
提示:https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
原因
No response