diff options
Diffstat (limited to 'src/webview/darkmode.ts')
-rw-r--r-- | src/webview/darkmode.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/webview/darkmode.ts b/src/webview/darkmode.ts index e06c22f11..7b9407049 100644 --- a/src/webview/darkmode.ts +++ b/src/webview/darkmode.ts | |||
@@ -1,5 +1,3 @@ | |||
1 | /* eslint no-bitwise: ["error", { "int32Hint": true }] */ | ||
2 | |||
3 | import { join } from 'path'; | 1 | import { join } from 'path'; |
4 | import { pathExistsSync, readFileSync } from 'fs-extra'; | 2 | import { pathExistsSync, readFileSync } from 'fs-extra'; |
5 | 3 | ||
@@ -7,7 +5,9 @@ const debug = require('debug')('Ferdi:DarkMode'); | |||
7 | 5 | ||
8 | const chars = [...'abcdefghijklmnopqrstuvwxyz']; | 6 | const chars = [...'abcdefghijklmnopqrstuvwxyz']; |
9 | 7 | ||
10 | const ID = [...Array(20)].map(() => chars[Math.random() * chars.length | 0]).join(''); | 8 | const ID = [...Array.from({ length: 20 })] |
9 | .map(() => chars[Math.trunc(Math.random() * chars.length)]) | ||
10 | .join(''); | ||
11 | 11 | ||
12 | export function injectDarkModeStyle(recipePath: string) { | 12 | export function injectDarkModeStyle(recipePath: string) { |
13 | const darkModeStyle = join(recipePath, 'darkmode.css'); | 13 | const darkModeStyle = join(recipePath, 'darkmode.css'); |