diff options
Diffstat (limited to 'src/webview/recipe.js')
-rw-r--r-- | src/webview/recipe.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/webview/recipe.js b/src/webview/recipe.js index c223b73de..353eb31fd 100644 --- a/src/webview/recipe.js +++ b/src/webview/recipe.js | |||
@@ -12,6 +12,7 @@ import contextMenu from './contextMenu'; | |||
12 | import './notifications'; | 12 | import './notifications'; |
13 | 13 | ||
14 | import { DEFAULT_APP_SETTINGS } from '../config'; | 14 | import { DEFAULT_APP_SETTINGS } from '../config'; |
15 | import { isDevMode } from '../environment'; | ||
15 | 16 | ||
16 | const debug = require('debug')('Franz:Plugin'); | 17 | const debug = require('debug')('Franz:Plugin'); |
17 | 18 | ||
@@ -173,11 +174,17 @@ new RecipeController(); | |||
173 | // Patching window.open | 174 | // Patching window.open |
174 | const originalWindowOpen = window.open; | 175 | const originalWindowOpen = window.open; |
175 | 176 | ||
177 | |||
176 | window.open = (url, frameName, features) => { | 178 | window.open = (url, frameName, features) => { |
179 | debug('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 | 180 | // We need to differentiate if the link should be opened in a popup or in the systems default browser |
178 | if (!frameName && !features) { | 181 | if (!frameName && !features && typeof features !== 'string') { |
179 | return ipcRenderer.sendToHost('new-window', url); | 182 | return ipcRenderer.sendToHost('new-window', url); |
180 | } | 183 | } |
181 | 184 | ||
182 | return originalWindowOpen(url, frameName, features); | 185 | return originalWindowOpen(url, frameName, features); |
183 | }; | 186 | }; |
187 | |||
188 | if (isDevMode) { | ||
189 | window.log = console.log; | ||
190 | } | ||