aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/skype/webview.js
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/skype/webview.js
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/skype/webview.js')
-rw-r--r--recipes/skype/webview.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/recipes/skype/webview.js b/recipes/skype/webview.js
index b317d14..db97d98 100644
--- a/recipes/skype/webview.js
+++ b/recipes/skype/webview.js
@@ -38,15 +38,13 @@ module.exports = (Ferdium, settings) => {
38 if (link || button) { 38 if (link || button) {
39 const url = link ? link.getAttribute('href') : button.getAttribute('title'); 39 const url = link ? link.getAttribute('href') : button.getAttribute('title');
40 40
41 if (url.includes('views/imgpsh_fullsize_anim')) { 41 event.preventDefault();
42 event.preventDefault(); 42 event.stopPropagation();
43 event.stopPropagation(); 43
44 44 if (settings.trapLinkClicks === true) {
45 if (settings.trapLinkClicks === true) { 45 window.location.href = url;
46 window.location.href = url; 46 } else {
47 } else { 47 Ferdium.openNewWindow(url);
48 Ferdium.openNewWindow(url);
49 }
50 } 48 }
51 } 49 }
52 }, true); 50 }, true);