diff options
author | 2019-10-17 14:57:57 +0200 | |
---|---|---|
committer | 2019-10-17 14:57:57 +0200 | |
commit | 2469be543048b575c0cd8e8fccdef2a73e6046d3 (patch) | |
tree | a4ae45c4e8881aa2bb345d2368007f4f6340c253 /src/webview | |
parent | update strings (diff) | |
download | ferdium-app-2469be543048b575c0cd8e8fccdef2a73e6046d3.tar.gz ferdium-app-2469be543048b575c0cd8e8fccdef2a73e6046d3.tar.zst ferdium-app-2469be543048b575c0cd8e8fccdef2a73e6046d3.zip |
Add debugging logs
Diffstat (limited to 'src/webview')
-rw-r--r-- | src/webview/lib/RecipeWebview.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js index be29142af..e3212d0e6 100644 --- a/src/webview/lib/RecipeWebview.js +++ b/src/webview/lib/RecipeWebview.js | |||
@@ -2,6 +2,8 @@ | |||
2 | const { ipcRenderer } = require('electron'); | 2 | const { ipcRenderer } = require('electron'); |
3 | const fs = require('fs-extra'); | 3 | const fs = require('fs-extra'); |
4 | 4 | ||
5 | const debug = require('debug')('Franz:Plugin:RecipeWebview'); | ||
6 | |||
5 | class RecipeWebview { | 7 | class RecipeWebview { |
6 | constructor() { | 8 | constructor() { |
7 | this.countCache = { | 9 | this.countCache = { |
@@ -11,6 +13,8 @@ class RecipeWebview { | |||
11 | 13 | ||
12 | ipcRenderer.on('poll', () => { | 14 | ipcRenderer.on('poll', () => { |
13 | this.loopFunc(); | 15 | this.loopFunc(); |
16 | |||
17 | debug('Poll event'); | ||
14 | }); | 18 | }); |
15 | } | 19 | } |
16 | 20 | ||
@@ -44,8 +48,11 @@ class RecipeWebview { | |||
44 | indirect: indirect > 0 ? indirect : 0, | 48 | indirect: indirect > 0 ? indirect : 0, |
45 | }; | 49 | }; |
46 | 50 | ||
51 | |||
47 | ipcRenderer.sendToHost('messages', count); | 52 | ipcRenderer.sendToHost('messages', count); |
48 | Object.assign(this.countCache, count); | 53 | Object.assign(this.countCache, count); |
54 | |||
55 | debug('Sending badge count to host', count); | ||
49 | } | 56 | } |
50 | 57 | ||
51 | /** | 58 | /** |
@@ -61,6 +68,8 @@ class RecipeWebview { | |||
61 | styles.innerHTML = data.toString(); | 68 | styles.innerHTML = data.toString(); |
62 | 69 | ||
63 | document.querySelector('head').appendChild(styles); | 70 | document.querySelector('head').appendChild(styles); |
71 | |||
72 | debug('Append styles', styles); | ||
64 | }); | 73 | }); |
65 | } | 74 | } |
66 | 75 | ||