diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2023-02-01 12:41:35 +0530 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2023-02-01 12:41:35 +0530 |
commit | 57d42981a17cf7cf0cd8e3700de9a6f59219c92f (patch) | |
tree | 40a38fd9ebff026680e95f38ca5232783623dd8d /src | |
parent | Bump react-dropzone from 11.7.1 to 14.2.3 (#887) (diff) | |
download | ferdium-app-57d42981a17cf7cf0cd8e3700de9a6f59219c92f.tar.gz ferdium-app-57d42981a17cf7cf0cd8e3700de9a6f59219c92f.tar.zst ferdium-app-57d42981a17cf7cf0cd8e3700de9a6f59219c92f.zip |
Added debug stmts when loading 'user.css' and 'darkmode.css'
Diffstat (limited to 'src')
-rw-r--r-- | src/webview/darkmode.ts | 4 | ||||
-rw-r--r-- | src/webview/recipe.ts | 1 |
2 files changed, 4 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 | ||
20 | export function injectDarkModeStyle(recipePath: string) { | 20 | export 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 | ||
diff --git a/src/webview/recipe.ts b/src/webview/recipe.ts index ed45192d3..36b8b7c98 100644 --- a/src/webview/recipe.ts +++ b/src/webview/recipe.ts | |||
@@ -265,6 +265,7 @@ class RecipeController { | |||
265 | if (pathExistsSync(userCss)) { | 265 | if (pathExistsSync(userCss)) { |
266 | const data = readFileSync(userCss); | 266 | const data = readFileSync(userCss); |
267 | styles.innerHTML += data.toString(); | 267 | styles.innerHTML += data.toString(); |
268 | debug('Loaded user.css from: ', userCss); | ||
268 | } | 269 | } |
269 | document.querySelector('head')?.append(styles); | 270 | document.querySelector('head')?.append(styles); |
270 | 271 | ||