diff options
author | 2021-07-09 05:38:00 +0530 | |
---|---|---|
committer | 2021-07-09 05:40:10 +0530 | |
commit | bc7daa30074b72a288c6f8a6d4ce167797df8a92 (patch) | |
tree | 4f944224e175077353c5eeaa211794a7d0faabe4 /src/webview/lib/RecipeWebview.js | |
parent | New Crowdin updates (#1617) (diff) | |
download | ferdium-app-bc7daa30074b72a288c6f8a6d4ce167797df8a92.tar.gz ferdium-app-bc7daa30074b72a288c6f8a6d4ce167797df8a92.tar.zst ferdium-app-bc7daa30074b72a288c6f8a6d4ce167797df8a92.zip |
Converted 2 js files to es6 [skip ci]
Diffstat (limited to 'src/webview/lib/RecipeWebview.js')
-rw-r--r-- | src/webview/lib/RecipeWebview.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js index b5793a5f1..b8fe7dc52 100644 --- a/src/webview/lib/RecipeWebview.js +++ b/src/webview/lib/RecipeWebview.js | |||
@@ -1,5 +1,5 @@ | |||
1 | const { ipcRenderer } = require('electron'); | 1 | import { ipcRenderer } from 'electron'; |
2 | const fs = require('fs-extra'); | 2 | import { pathExistsSync, readFile } from 'fs-extra'; |
3 | 3 | ||
4 | const debug = require('debug')('Ferdi:Plugin:RecipeWebview'); | 4 | const debug = require('debug')('Ferdi:Plugin:RecipeWebview'); |
5 | 5 | ||
@@ -73,8 +73,8 @@ class RecipeWebview { | |||
73 | */ | 73 | */ |
74 | injectCSS(...files) { | 74 | injectCSS(...files) { |
75 | files.forEach(async (file) => { | 75 | files.forEach(async (file) => { |
76 | if (fs.pathExistsSync(file)) { | 76 | if (pathExistsSync(file)) { |
77 | const data = await fs.readFile(file, 'utf8'); | 77 | const data = await readFile(file, 'utf8'); |
78 | const styles = document.createElement('style'); | 78 | const styles = document.createElement('style'); |
79 | styles.innerHTML = data; | 79 | styles.innerHTML = data; |
80 | 80 | ||
@@ -107,4 +107,4 @@ class RecipeWebview { | |||
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
110 | module.exports = RecipeWebview; | 110 | export default RecipeWebview; |