From 804aafb265e93c50abcb4d2c28e0ddfab16a36bb Mon Sep 17 00:00:00 2001 From: André Oliveira <37463445+SpecialAro@users.noreply.github.com> Date: Tue, 31 May 2022 16:07:41 +0100 Subject: Fix open image in app or externally (instead of popup) (#37) Fix #195 on Ferdium-app which causes a problem when opening images inside the discord (and possibly zoom). --- recipes/zoom/package.json | 2 +- recipes/zoom/webview.js | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'recipes/zoom') diff --git a/recipes/zoom/package.json b/recipes/zoom/package.json index eb8f557..5357394 100644 --- a/recipes/zoom/package.json +++ b/recipes/zoom/package.json @@ -1,7 +1,7 @@ { "id": "zoom", "name": "Zoom", - "version": "1.3.2", + "version": "1.3.3", "license": "MIT", "config": { "serviceURL": "https://zoom.us/join", diff --git a/recipes/zoom/webview.js b/recipes/zoom/webview.js index 030c038..1255675 100644 --- a/recipes/zoom/webview.js +++ b/recipes/zoom/webview.js @@ -33,14 +33,16 @@ module.exports = (Ferdium, settings) => { if (link || button) { const url = link ? link.getAttribute('href') : button.getAttribute('title'); - - event.preventDefault(); - event.stopPropagation(); - - if (settings.trapLinkClicks === true) { - window.location.href = url; - } else { - Ferdium.openNewWindow(url); + + if (!Ferdium.isImage(url)) { + event.preventDefault(); + event.stopPropagation(); + + if (settings.trapLinkClicks === true) { + window.location.href = url; + } else { + Ferdium.openNewWindow(url); + } } } }, true); -- cgit v1.2.3-70-g09d2