From 71d898e65d6d732de255f4313a9284959b7f7fa7 Mon Sep 17 00:00:00 2001 From: André Oliveira Date: Fri, 8 Jul 2022 16:17:01 +0100 Subject: Fix in app URLs for discord --- recipes/discord/package.json | 2 +- recipes/discord/webview.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'recipes') diff --git a/recipes/discord/package.json b/recipes/discord/package.json index b79a293..aed7ab6 100644 --- a/recipes/discord/package.json +++ b/recipes/discord/package.json @@ -1,7 +1,7 @@ { "id": "discord", "name": "Discord", - "version": "1.7.5", + "version": "1.7.6", "license": "MIT", "config": { "serviceURL": "https://discordapp.com/login", 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) => { if (link || button) { const url = link ? link.getAttribute('href') : button.getAttribute('title'); - - if (!Ferdium.isImage(url)) { + const stayInsideDiscord = url.includes('https://discordapp.com/channels/'); + + if (!Ferdium.isImage(url) && !stayInsideDiscord) { event.preventDefault(); event.stopPropagation(); -- cgit v1.2.3-70-g09d2