aboutsummaryrefslogtreecommitdiffstats
path: root/src/webview/darkmode.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview/darkmode.ts')
-rw-r--r--src/webview/darkmode.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/webview/darkmode.ts b/src/webview/darkmode.ts
index 34f987b51..9944a7afa 100644
--- a/src/webview/darkmode.ts
+++ b/src/webview/darkmode.ts
@@ -19,10 +19,12 @@ export function darkModeStyleExists(recipePath: string) {
19 19
20export function injectDarkModeStyle(recipePath: string) { 20export function injectDarkModeStyle(recipePath: string) {
21 if (darkModeStyleExists(recipePath)) { 21 if (darkModeStyleExists(recipePath)) {
22 const data = readFileSync(darkModeFilePath(recipePath)); 22 const darkmodeCss = darkModeFilePath(recipePath);
23 const data = readFileSync(darkmodeCss);
23 const styles = document.createElement('style'); 24 const styles = document.createElement('style');
24 styles.id = ID; 25 styles.id = ID;
25 styles.innerHTML = data.toString(); 26 styles.innerHTML = data.toString();
27 debug('Loaded darkmode.css from: ', darkmodeCss);
26 28
27 document.querySelector('head')?.appendChild(styles); 29 document.querySelector('head')?.appendChild(styles);
28 30