diff options
author | André Oliveira <oliveira.andrerodrigues95@gmail.com> | 2022-07-08 16:17:01 +0100 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2022-07-08 21:12:26 +0530 |
commit | 71d898e65d6d732de255f4313a9284959b7f7fa7 (patch) | |
tree | 4115224d9dc77b07a55a9e3f3ae86f2769be220c /recipes/discord/webview.js | |
parent | Upgrade 'pnpm' to '7.5.0' (diff) | |
download | ferdium-recipes-71d898e65d6d732de255f4313a9284959b7f7fa7.tar.gz ferdium-recipes-71d898e65d6d732de255f4313a9284959b7f7fa7.tar.zst ferdium-recipes-71d898e65d6d732de255f4313a9284959b7f7fa7.zip |
Fix in app URLs for discord
Diffstat (limited to 'recipes/discord/webview.js')
-rw-r--r-- | recipes/discord/webview.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/recipes/discord/webview.js b/recipes/discord/webview.js index 1255675..3ad4a60 100644 --- a/recipes/discord/webview.js +++ b/recipes/discord/webview.js | |||
@@ -33,8 +33,9 @@ module.exports = (Ferdium, settings) => { | |||
33 | 33 | ||
34 | if (link || button) { | 34 | if (link || button) { |
35 | const url = link ? link.getAttribute('href') : button.getAttribute('title'); | 35 | const url = link ? link.getAttribute('href') : button.getAttribute('title'); |
36 | 36 | const stayInsideDiscord = url.includes('https://discordapp.com/channels/'); | |
37 | if (!Ferdium.isImage(url)) { | 37 | |
38 | if (!Ferdium.isImage(url) && !stayInsideDiscord) { | ||
38 | event.preventDefault(); | 39 | event.preventDefault(); |
39 | event.stopPropagation(); | 40 | event.stopPropagation(); |
40 | 41 | ||