diff options
author | 2021-09-27 09:03:25 +0530 | |
---|---|---|
committer | 2021-09-27 09:03:25 +0530 | |
commit | eb893bfca211204303fc4c0dc115bad249c6145c (patch) | |
tree | 6adbac4e3efc201113d04201cc940d3d9d98b5e6 /recipes | |
parent | refactor: remove references 'Ferdi.ipcRenderer' in recipes - create an abstra... (diff) | |
download | ferdium-recipes-eb893bfca211204303fc4c0dc115bad249c6145c.tar.gz ferdium-recipes-eb893bfca211204303fc4c0dc115bad249c6145c.tar.zst ferdium-recipes-eb893bfca211204303fc4c0dc115bad249c6145c.zip |
refactor: remove references 'Ferdi.ipcRenderer' in recipes - create an abstraction layer instead for better maintainance
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/steamchat/package.json | 2 | ||||
-rw-r--r-- | recipes/steamchat/webview.js | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/recipes/steamchat/package.json b/recipes/steamchat/package.json index d06d543..b13ab5d 100644 --- a/recipes/steamchat/package.json +++ b/recipes/steamchat/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "steamchat", | 2 | "id": "steamchat", |
3 | "name": "SteamChat", | 3 | "name": "SteamChat", |
4 | "version": "1.3.1", | 4 | "version": "1.3.2", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://steamcommunity.com/chat", | 7 | "serviceURL": "https://steamcommunity.com/chat", |
diff --git a/recipes/steamchat/webview.js b/recipes/steamchat/webview.js index d1d3d15..61d57ad 100644 --- a/recipes/steamchat/webview.js +++ b/recipes/steamchat/webview.js | |||
@@ -29,10 +29,9 @@ module.exports = Ferdi => { | |||
29 | const link = event.target.closest('a[href^="http"]'); | 29 | const link = event.target.closest('a[href^="http"]'); |
30 | 30 | ||
31 | if (link && link.getAttribute('target') === '_top') { | 31 | if (link && link.getAttribute('target') === '_top') { |
32 | const url = link.getAttribute('href'); | ||
33 | event.preventDefault(); | 32 | event.preventDefault(); |
34 | event.stopPropagation(); | 33 | event.stopPropagation(); |
35 | Ferdi.ipcRenderer.sendToHost('new-window', url); | 34 | Ferdi.openNewWindow(link.getAttribute('href')); |
36 | } | 35 | } |
37 | }, true); | 36 | }, true); |
38 | }; | 37 | }; |