diff --git a/src/components/strategies/next.js b/src/components/strategies/next.js index 4cd2092..806cd5c 100644 --- a/src/components/strategies/next.js +++ b/src/components/strategies/next.js @@ -2,11 +2,11 @@ import { getYtcfgValue, isConfirmed, isEmbed } from '../../utils'; import { innertube, proxy } from '../endpoints'; export default function getUnlockStrategies(videoId, lastPlayerUnlockReason) { - const context = getYtcfgValue('INNERTUBE_CONTEXT'); const clientName = getYtcfgValue('INNERTUBE_CLIENT_NAME') || 'WEB'; const clientVersion = getYtcfgValue('INNERTUBE_CLIENT_VERSION') || '2.20220203.04.00'; const hl = getYtcfgValue('HL'); - const userInterfaceTheme = context.client.userInterfaceTheme; + const userInterfaceTheme = getYtcfgValue('INNERTUBE_CONTEXT').client.userInterfaceTheme + ?? (document.documentElement.hasAttribute("dark") ? 'USER_INTERFACE_THEME_DARK' : 'USER_INTERFACE_THEME_LIGHT'); return [ /**