diff options
author | 2018-03-28 10:12:03 +0200 | |
---|---|---|
committer | 2018-03-28 10:12:26 +0200 | |
commit | 5398846e58d87f5ef54ccc19f4ccb318166ef621 (patch) | |
tree | a2d19dac75532152cfb0c9e5df7db10475da005f /src/webview | |
parent | Set correct keys for new settings store (diff) | |
download | ferdium-app-5398846e58d87f5ef54ccc19f4ccb318166ef621.tar.gz ferdium-app-5398846e58d87f5ef54ccc19f4ccb318166ef621.tar.zst ferdium-app-5398846e58d87f5ef54ccc19f4ccb318166ef621.zip |
Replace share settings with webviews autorun with single key reaction
Diffstat (limited to 'src/webview')
-rw-r--r-- | src/webview/plugin.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/webview/plugin.js b/src/webview/plugin.js index 52b19b3fd..c6530fef6 100644 --- a/src/webview/plugin.js +++ b/src/webview/plugin.js | |||
@@ -8,6 +8,8 @@ import RecipeWebview from './lib/RecipeWebview'; | |||
8 | import Spellchecker from './spellchecker'; | 8 | import Spellchecker from './spellchecker'; |
9 | import './notifications'; | 9 | import './notifications'; |
10 | 10 | ||
11 | const debug = require('debug')('Plugin'); | ||
12 | |||
11 | ipcRenderer.on('initializeRecipe', (e, data) => { | 13 | ipcRenderer.on('initializeRecipe', (e, data) => { |
12 | const modulePath = path.join(data.recipe.path, 'webview.js'); | 14 | const modulePath = path.join(data.recipe.path, 'webview.js'); |
13 | // Delete module from cache | 15 | // Delete module from cache |
@@ -15,8 +17,9 @@ ipcRenderer.on('initializeRecipe', (e, data) => { | |||
15 | try { | 17 | try { |
16 | // eslint-disable-next-line | 18 | // eslint-disable-next-line |
17 | require(modulePath)(new RecipeWebview(), data); | 19 | require(modulePath)(new RecipeWebview(), data); |
20 | debug('Initialize Recipe'); | ||
18 | } catch (err) { | 21 | } catch (err) { |
19 | console.error(err); | 22 | debug('Recipe initialization failed', err); |
20 | } | 23 | } |
21 | }); | 24 | }); |
22 | 25 | ||
@@ -31,6 +34,7 @@ new ContextMenuListener((info) => { // eslint-disable-line | |||
31 | 34 | ||
32 | ipcRenderer.on('settings-update', (e, data) => { | 35 | ipcRenderer.on('settings-update', (e, data) => { |
33 | spellchecker.toggleSpellchecker(data.enableSpellchecking); | 36 | spellchecker.toggleSpellchecker(data.enableSpellchecking); |
37 | debug('Settings update received', data); | ||
34 | }); | 38 | }); |
35 | 39 | ||
36 | // initSpellche | 40 | // initSpellche |