diff options
author | 2022-04-22 15:04:21 -0500 | |
---|---|---|
committer | 2022-04-22 20:04:21 +0000 | |
commit | 759d93dc198a3cc8c5265245c0144efa5435682b (patch) | |
tree | 53e963a085d3d12af5a2efa2f1ab6f3e5574edc7 /src/components/services | |
parent | Added build scripts for linux, macos and windows to help new contributors get... (diff) | |
download | ferdium-app-759d93dc198a3cc8c5265245c0144efa5435682b.tar.gz ferdium-app-759d93dc198a3cc8c5265245c0144efa5435682b.tar.zst ferdium-app-759d93dc198a3cc8c5265245c0144efa5435682b.zip |
Turn off usage of 'debug' npm package using with electron-16 (fixes #17)
Diffstat (limited to 'src/components/services')
-rw-r--r-- | src/components/services/content/ServiceWebview.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index b30a8d9b0..f1c4251ba 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js | |||
@@ -7,7 +7,8 @@ import { join } from 'path'; | |||
7 | 7 | ||
8 | import ServiceModel from '../../../models/Service'; | 8 | import ServiceModel from '../../../models/Service'; |
9 | 9 | ||
10 | const debug = require('debug')('Ferdium:Services'); | 10 | // TODO: Go back to 'debug' from 'console.log' when https://github.com/electron/electron/issues/31689 is fixed |
11 | // const debug = require('debug')('Ferdium:Services'); | ||
11 | 12 | ||
12 | class ServiceWebview extends Component { | 13 | class ServiceWebview extends Component { |
13 | static propTypes = { | 14 | static propTypes = { |
@@ -27,7 +28,7 @@ class ServiceWebview extends Component { | |||
27 | () => { | 28 | () => { |
28 | if (this.webview && this.webview.view) { | 29 | if (this.webview && this.webview.view) { |
29 | this.webview.view.addEventListener('console-message', e => { | 30 | this.webview.view.addEventListener('console-message', e => { |
30 | debug('Service logged a message:', e.message); | 31 | console.log('Service logged a message:', e.message); |
31 | }); | 32 | }); |
32 | this.webview.view.addEventListener('did-navigate', () => { | 33 | this.webview.view.addEventListener('did-navigate', () => { |
33 | if (this.props.service._webview) { | 34 | if (this.props.service._webview) { |
@@ -50,7 +51,7 @@ class ServiceWebview extends Component { | |||
50 | 51 | ||
51 | refocusWebview = () => { | 52 | refocusWebview = () => { |
52 | const { webview } = this; | 53 | const { webview } = this; |
53 | debug('Refocus Webview is called', this.props.service); | 54 | console.log('Refocus Webview is called', this.props.service); |
54 | if (!webview) return; | 55 | if (!webview) return; |
55 | if (this.props.service.isActive) { | 56 | if (this.props.service.isActive) { |
56 | webview.view.blur(); | 57 | webview.view.blur(); |
@@ -63,7 +64,7 @@ class ServiceWebview extends Component { | |||
63 | } ${`- ${this.props.service._webview.getTitle()}`}`; | 64 | } ${`- ${this.props.service._webview.getTitle()}`}`; |
64 | }, 100); | 65 | }, 100); |
65 | } else { | 66 | } else { |
66 | debug('Refocus not required - Not active service'); | 67 | console.log('Refocus not required - Not active service'); |
67 | } | 68 | } |
68 | }; | 69 | }; |
69 | 70 | ||