fix conflict

This commit is contained in:
Tamius Han 2025-01-25 21:08:09 +01:00
parent 5479b7ee95
commit 5da8073235

View File

@ -6,8 +6,8 @@ if (process.env.CHANNEL !== 'stable'){
const csuiVersions = { const csuiVersions = {
'normal': 'csui', // csui-overlay-normal.html, maps to csui.html 'normal': 'csui', // csui-overlay-normal.html, maps to csui.html
// 'light': 'csui-light', // csui-overlay-light.html, maps to csui-light.html 'light': 'csui-light', // csui-overlay-light.html, maps to csui-light.html
// 'dark': 'csui-dark' // csui-overlay-dark.html, maps to csui-dark.html 'dark': 'csui-dark' // csui-overlay-dark.html, maps to csui-dark.html
}; };
const MAX_IFRAME_ERROR_COUNT = 5; const MAX_IFRAME_ERROR_COUNT = 5;
@ -22,12 +22,6 @@ class UI {
this.lastProbeResponseTs = null; this.lastProbeResponseTs = null;
this.isGlobal = uiConfig.isGlobal ?? false; this.isGlobal = uiConfig.isGlobal ?? false;
// TODO: at some point, UI should be different for global popup and in-player UI
const preferredScheme = window.getComputedStyle( document.body ,null).getPropertyValue('color-scheme');
const csuiVersion = csuiVersions[preferredScheme] ?? csuiVersions.normal;
this.uiURI = chrome.runtime.getURL(`/csui/${csuiVersion}.html`);
this.extensionBase = chrome.runtime.getURL('').replace(/\/$/, "");
this.eventBus = uiConfig.eventBus; this.eventBus = uiConfig.eventBus;
this.disablePointerEvents = false; this.disablePointerEvents = false;