aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/zoom
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2022-05-31 16:07:41 +0100
committerLibravatar GitHub <noreply@github.com>2022-05-31 16:07:41 +0100
commit804aafb265e93c50abcb4d2c28e0ddfab16a36bb (patch)
treed11dd6abab6c98b19b617c3c4de1815122fe2888 /recipes/zoom
parentChange of Proton Service URL (#36) (diff)
downloadferdium-recipes-804aafb265e93c50abcb4d2c28e0ddfab16a36bb.tar.gz
ferdium-recipes-804aafb265e93c50abcb4d2c28e0ddfab16a36bb.tar.zst
ferdium-recipes-804aafb265e93c50abcb4d2c28e0ddfab16a36bb.zip
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).
Diffstat (limited to 'recipes/zoom')
-rw-r--r--recipes/zoom/package.json2
-rw-r--r--recipes/zoom/webview.js18
2 files changed, 11 insertions, 9 deletions
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 @@
1{ 1{
2 "id": "zoom", 2 "id": "zoom",
3 "name": "Zoom", 3 "name": "Zoom",
4 "version": "1.3.2", 4 "version": "1.3.3",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://zoom.us/join", 7 "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) => {
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
37 event.preventDefault(); 37 if (!Ferdium.isImage(url)) {
38 event.stopPropagation(); 38 event.preventDefault();
39 39 event.stopPropagation();
40 if (settings.trapLinkClicks === true) { 40
41 window.location.href = url; 41 if (settings.trapLinkClicks === true) {
42 } else { 42 window.location.href = url;
43 Ferdium.openNewWindow(url); 43 } else {
44 Ferdium.openNewWindow(url);
45 }
44 } 46 }
45 } 47 }
46 }, true); 48 }, true);