summaryrefslogtreecommitdiffstats
path: root/src/webview/plugin.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-03-28 10:12:03 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-03-28 10:12:26 +0200
commit5398846e58d87f5ef54ccc19f4ccb318166ef621 (patch)
treea2d19dac75532152cfb0c9e5df7db10475da005f /src/webview/plugin.js
parentSet correct keys for new settings store (diff)
downloadferdium-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/plugin.js')
-rw-r--r--src/webview/plugin.js6
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';
8import Spellchecker from './spellchecker'; 8import Spellchecker from './spellchecker';
9import './notifications'; 9import './notifications';
10 10
11const debug = require('debug')('Plugin');
12
11ipcRenderer.on('initializeRecipe', (e, data) => { 13ipcRenderer.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
32ipcRenderer.on('settings-update', (e, data) => { 35ipcRenderer.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