diff options
Diffstat (limited to 'recipes/discord/webview.js')
-rw-r--r-- | recipes/discord/webview.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/recipes/discord/webview.js b/recipes/discord/webview.js index 480329d..9c96f9f 100644 --- a/recipes/discord/webview.js +++ b/recipes/discord/webview.js | |||
@@ -93,10 +93,10 @@ module.exports = (Ferdi, settings) => { | |||
93 | 93 | ||
94 | if (link || button) { | 94 | if (link || button) { |
95 | const url = link ? link.getAttribute('href') : button.getAttribute('title'); | 95 | const url = link ? link.getAttribute('href') : button.getAttribute('title'); |
96 | event.preventDefault(); | ||
97 | event.stopPropagation(); | ||
98 | 96 | ||
99 | if (url.includes('views/imgpsh_fullsize_anim')) { | 97 | if (url.includes('views/imgpsh_fullsize_anim')) { |
98 | event.preventDefault(); | ||
99 | event.stopPropagation(); | ||
100 | let win = new Ferdi.BrowserWindow({ | 100 | let win = new Ferdi.BrowserWindow({ |
101 | width: 800, | 101 | width: 800, |
102 | height: window.innerHeight, | 102 | height: window.innerHeight, |
@@ -109,8 +109,6 @@ module.exports = (Ferdi, settings) => { | |||
109 | win.on('closed', () => { | 109 | win.on('closed', () => { |
110 | win = null; | 110 | win = null; |
111 | }); | 111 | }); |
112 | } else { | ||
113 | window.open(url); | ||
114 | } | 112 | } |
115 | } | 113 | } |
116 | }, true); | 114 | }, true); |