Skip to content

Commit 6569b0c

Browse files
committed
Updated getScheme() to work w/ new ChatGPT classes ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-auto-refresh]
1 parent d0b0b8f commit 6569b0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chatgpt/chatgpt-auto-refresh/chatgpt-auto-refresh.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
// @description:zu *NGOKUPHEPHA* susa ukusetha kabusha ingxoxo yemizuzu eyi-10 + amaphutha enethiwekhi ahlala njalo + Ukuhlolwa kwe-Cloudflare ku-ChatGPT.
221221
// @author Adam Lui
222222
// @namespace https://github.com/adamlui
223-
// @version 2025.4.28
223+
// @version 2025.4.28.1
224224
// @license MIT
225225
// @icon https://assets.chatgptautorefresh.com/images/icons/openai/black/icon48.png?v=f11a0a8
226226
// @icon64 https://assets.chatgptautorefresh.com/images/icons/openai/black/icon64.png?v=f11a0a8
@@ -775,8 +775,8 @@
775775
// Define UI functions
776776

777777
function getScheme() {
778-
return document.documentElement.className
779-
|| ( window.matchMedia?.('(prefers-color-scheme: dark)')?.matches ? 'dark' : 'light' )
778+
return /\b(light|dark)\b/.exec(document.documentElement.className)?.[1]
779+
|| ( window.matchMedia?.('(prefers-color-scheme: dark)')?.matches ? 'dark' : 'light' )
780780
}
781781

782782
function syncConfigToUI(options) {

0 commit comments

Comments
 (0)