diff options
Diffstat (limited to 'src/components/services')
-rw-r--r-- | src/components/services/content/ServiceWebview.js | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index 2562c09ce..187785f82 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js | |||
@@ -31,13 +31,15 @@ class ServiceWebview extends Component { | |||
31 | debug('Service logged a message:', e.message); | 31 | debug('Service logged a message:', e.message); |
32 | }); | 32 | }); |
33 | this.webview.view.addEventListener('did-navigate', () => { | 33 | this.webview.view.addEventListener('did-navigate', () => { |
34 | document.title = `Ferdi - ${this.props.service.name} ${this.props.service.dialogTitle | 34 | document.title = `Ferdi - ${this.props.service.name} ${ |
35 | ? ` - ${this.props.service.dialogTitle}` | 35 | this.props.service.dialogTitle |
36 | : '' | 36 | ? ` - ${this.props.service.dialogTitle}` |
37 | } ${`- ${this.props.service._webview.getTitle()}`}`; | 37 | : '' |
38 | }) | 38 | } ${`- ${this.props.service._webview.getTitle()}`}`; |
39 | }); | ||
39 | } | 40 | } |
40 | }) | 41 | }, |
42 | ); | ||
41 | } | 43 | } |
42 | 44 | ||
43 | componentWillUnmount() { | 45 | componentWillUnmount() { |
@@ -53,10 +55,11 @@ class ServiceWebview extends Component { | |||
53 | webview.view.blur(); | 55 | webview.view.blur(); |
54 | webview.view.focus(); | 56 | webview.view.focus(); |
55 | window.setTimeout(() => { | 57 | window.setTimeout(() => { |
56 | document.title = `Ferdi - ${this.props.service.name} ${this.props.service.dialogTitle | 58 | document.title = `Ferdi - ${this.props.service.name} ${ |
57 | ? ` - ${this.props.service.dialogTitle}` | 59 | this.props.service.dialogTitle |
58 | : '' | 60 | ? ` - ${this.props.service.dialogTitle}` |
59 | } ${`- ${this.props.service._webview.getTitle()}`}`; | 61 | : '' |
62 | } ${`- ${this.props.service._webview.getTitle()}`}`; | ||
60 | }, 100); | 63 | }, 100); |
61 | } else { | 64 | } else { |
62 | debug('Refocus not required - Not active service'); | 65 | debug('Refocus not required - Not active service'); |
@@ -103,8 +106,9 @@ class ServiceWebview extends Component { | |||
103 | } | 106 | } |
104 | allowpopups | 107 | allowpopups |
105 | nodeintegration | 108 | nodeintegration |
106 | webpreferences={`spellcheck=${isSpellcheckerEnabled ? 1 : 0 | 109 | webpreferences={`spellcheck=${ |
107 | }, contextIsolation=1, enableRemoteModule=1`} | 110 | isSpellcheckerEnabled ? 1 : 0 |
111 | }, contextIsolation=1, enableRemoteModule=1`} | ||
108 | /> | 112 | /> |
109 | ); | 113 | ); |
110 | } | 114 | } |