diff options
author | 2019-10-02 21:39:03 +0200 | |
---|---|---|
committer | 2019-10-02 21:39:03 +0200 | |
commit | a564a35bcf9bcfedd6dc7bc60ce2c115badd6985 (patch) | |
tree | 47a0d633e96dbb8e76a720d0ea98e5b0f48ea97b | |
parent | fix(Service Proxies): Fix proxy setting rehydration (diff) | |
download | ferdium-app-a564a35bcf9bcfedd6dc7bc60ce2c115badd6985.tar.gz ferdium-app-a564a35bcf9bcfedd6dc7bc60ce2c115badd6985.tar.zst ferdium-app-a564a35bcf9bcfedd6dc7bc60ce2c115badd6985.zip |
Use native window.open
-rw-r--r-- | src/webview/recipe.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/webview/recipe.js b/src/webview/recipe.js index c223b73de..7be307f05 100644 --- a/src/webview/recipe.js +++ b/src/webview/recipe.js | |||
@@ -169,15 +169,3 @@ class RecipeController { | |||
169 | /* eslint-disable no-new */ | 169 | /* eslint-disable no-new */ |
170 | new RecipeController(); | 170 | new RecipeController(); |
171 | /* eslint-enable no-new */ | 171 | /* eslint-enable no-new */ |
172 | |||
173 | // Patching window.open | ||
174 | const originalWindowOpen = window.open; | ||
175 | |||
176 | window.open = (url, frameName, features) => { | ||
177 | // We need to differentiate if the link should be opened in a popup or in the systems default browser | ||
178 | if (!frameName && !features) { | ||
179 | return ipcRenderer.sendToHost('new-window', url); | ||
180 | } | ||
181 | |||
182 | return originalWindowOpen(url, frameName, features); | ||
183 | }; | ||