diff options
author | 2021-09-14 19:58:52 +0200 | |
---|---|---|
committer | 2021-09-14 19:58:52 +0200 | |
commit | 95df3522a15631abc51a4295cae0ea401a8d4e1e (patch) | |
tree | e5eb0f368c947683f01458e912f21756fb0d99cb /src/webview/darkmode.ts | |
parent | docs: add sad270 as a contributor for bug, userTesting [skip ci] (#1941) (diff) | |
download | ferdium-app-95df3522a15631abc51a4295cae0ea401a8d4e1e.tar.gz ferdium-app-95df3522a15631abc51a4295cae0ea401a8d4e1e.tar.zst ferdium-app-95df3522a15631abc51a4295cae0ea401a8d4e1e.zip |
feat: add eslint-plugin-unicorn (#1936)
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'); |