diff options
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/discord/package.json | 2 | ||||
-rw-r--r-- | recipes/discord/webview.js | 6 | ||||
-rw-r--r-- | recipes/skype/package.json | 2 | ||||
-rw-r--r-- | recipes/skype/webview.js | 10 |
4 files changed, 15 insertions, 5 deletions
diff --git a/recipes/discord/package.json b/recipes/discord/package.json index ae1ba0c..a9fe8dd 100644 --- a/recipes/discord/package.json +++ b/recipes/discord/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "discord", | 2 | "id": "discord", |
3 | "name": "Discord", | 3 | "name": "Discord", |
4 | "version": "1.4.3", | 4 | "version": "1.4.4", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://discordapp.com/login", | 7 | "serviceURL": "https://discordapp.com/login", |
diff --git a/recipes/discord/webview.js b/recipes/discord/webview.js index 5a9f55a..2687948 100644 --- a/recipes/discord/webview.js +++ b/recipes/discord/webview.js | |||
@@ -29,6 +29,7 @@ module.exports = (Ferdi, settings) => { | |||
29 | 29 | ||
30 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 30 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); |
31 | 31 | ||
32 | // TODO: This whole block is duplicated between the 'discord' and 'skype' recipes - reuse | ||
32 | document.addEventListener('click', event => { | 33 | document.addEventListener('click', event => { |
33 | const link = event.target.closest('a[href^="http"]'); | 34 | const link = event.target.closest('a[href^="http"]'); |
34 | const button = event.target.closest('button[title^="http"]'); | 35 | const button = event.target.closest('button[title^="http"]'); |
@@ -39,12 +40,17 @@ module.exports = (Ferdi, settings) => { | |||
39 | if (url.includes('views/imgpsh_fullsize_anim')) { | 40 | if (url.includes('views/imgpsh_fullsize_anim')) { |
40 | event.preventDefault(); | 41 | event.preventDefault(); |
41 | event.stopPropagation(); | 42 | event.stopPropagation(); |
43 | // TODO: Can we send an ipc event 'open-browser-window' to open the child window? (see the slack recipe for how to send an ipc message) | ||
44 | // TODO: Can we change the slack recipe to add a clickHandler for screensharing/video calls? (https://github.com/getferdi/ferdi/issues/1697) | ||
42 | let win = new Ferdi.BrowserWindow({ | 45 | let win = new Ferdi.BrowserWindow({ |
43 | width: 800, | 46 | width: 800, |
44 | height: window.innerHeight, | 47 | height: window.innerHeight, |
45 | minWidth: 600, | 48 | minWidth: 600, |
46 | webPreferences: { | 49 | webPreferences: { |
47 | partition: `persist:service-${settings.id}` | 50 | partition: `persist:service-${settings.id}` |
51 | // TODO: Aren't these needed here? | ||
52 | // contextIsolation: false, | ||
53 | // enableRemoteModule: true, | ||
48 | } | 54 | } |
49 | }); | 55 | }); |
50 | win.loadURL(url); | 56 | win.loadURL(url); |
diff --git a/recipes/skype/package.json b/recipes/skype/package.json index d824a57..9aa8686 100644 --- a/recipes/skype/package.json +++ b/recipes/skype/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "skype", | 2 | "id": "skype", |
3 | "name": "Skype", | 3 | "name": "Skype", |
4 | "version": "3.2.1", | 4 | "version": "3.2.2", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://web.skype.com/", | 7 | "serviceURL": "https://web.skype.com/", |
diff --git a/recipes/skype/webview.js b/recipes/skype/webview.js index 18b63a5..d9775dd 100644 --- a/recipes/skype/webview.js +++ b/recipes/skype/webview.js | |||
@@ -30,6 +30,7 @@ module.exports = (Ferdi, settings) => { | |||
30 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 30 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); |
31 | Ferdi.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js')); | 31 | Ferdi.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js')); |
32 | 32 | ||
33 | // TODO: This whole block is duplicated between the 'discord' and 'skype' recipes - reuse | ||
33 | document.addEventListener('click', event => { | 34 | document.addEventListener('click', event => { |
34 | const link = event.target.closest('a[href^="http"]'); | 35 | const link = event.target.closest('a[href^="http"]'); |
35 | const button = event.target.closest('button[title^="http"]'); | 36 | const button = event.target.closest('button[title^="http"]'); |
@@ -42,18 +43,21 @@ module.exports = (Ferdi, settings) => { | |||
42 | event.stopPropagation(); | 43 | event.stopPropagation(); |
43 | // TODO: Can we send an ipc event 'open-browser-window' to open the child window? (see the slack recipe for how to send an ipc message) | 44 | // TODO: Can we send an ipc event 'open-browser-window' to open the child window? (see the slack recipe for how to send an ipc message) |
44 | // TODO: Can we change the slack recipe to add a clickHandler for screensharing/video calls? (https://github.com/getferdi/ferdi/issues/1697) | 45 | // TODO: Can we change the slack recipe to add a clickHandler for screensharing/video calls? (https://github.com/getferdi/ferdi/issues/1697) |
45 | const win = new Ferdi.BrowserWindow({ | 46 | let win = new Ferdi.BrowserWindow({ |
46 | width: 800, | 47 | width: 800, |
47 | height: window.innerHeight, | 48 | height: window.innerHeight, |
48 | minWidth: 600, | 49 | minWidth: 600, |
49 | webPreferences: { | 50 | webPreferences: { |
50 | partition: `persist:service-${settings.id}`, | 51 | partition: `persist:service-${settings.id}` |
51 | // TODO: Aren't these needed here? | 52 | // TODO: Aren't these needed here? |
52 | // contextIsolation: false, | 53 | // contextIsolation: false, |
53 | // enableRemoteModule: true, | 54 | // enableRemoteModule: true, |
54 | }, | 55 | } |
55 | }); | 56 | }); |
56 | win.loadURL(url); | 57 | win.loadURL(url); |
58 | win.on('closed', () => { | ||
59 | win = null; | ||
60 | }); | ||
57 | } | 61 | } |
58 | } | 62 | } |
59 | }, true); | 63 | }, true); |