diff options
author | 2023-07-20 01:20:32 +0200 | |
---|---|---|
committer | 2023-07-20 04:50:32 +0530 | |
commit | c0146ce37126aa3ab8e1d5e744254e02054bb496 (patch) | |
tree | c2b1dbee3d987df49e5f1091e019aeb74e47e8bf /recipes/telegram/webview.js | |
parent | Fix WhatsApp count (#390) (diff) | |
download | ferdium-recipes-c0146ce37126aa3ab8e1d5e744254e02054bb496.tar.gz ferdium-recipes-c0146ce37126aa3ab8e1d5e744254e02054bb496.tar.zst ferdium-recipes-c0146ce37126aa3ab8e1d5e744254e02054bb496.zip |
Open Telegram links within Ferdium (#394)
Diffstat (limited to 'recipes/telegram/webview.js')
-rw-r--r-- | recipes/telegram/webview.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/recipes/telegram/webview.js b/recipes/telegram/webview.js index 288160a..a4133ca 100644 --- a/recipes/telegram/webview.js +++ b/recipes/telegram/webview.js | |||
@@ -95,7 +95,11 @@ module.exports = (Ferdium, settings) => { | |||
95 | event.preventDefault(); | 95 | event.preventDefault(); |
96 | event.stopPropagation(); | 96 | event.stopPropagation(); |
97 | 97 | ||
98 | if (settings.trapLinkClicks === true) { | 98 | if ( |
99 | settings.trapLinkClicks === true | ||
100 | || url.includes('t.me') | ||
101 | || url.includes('web.telegram.org') | ||
102 | ) { | ||
99 | window.location.href = url; | 103 | window.location.href = url; |
100 | } else { | 104 | } else { |
101 | Ferdium.openNewWindow(url); | 105 | Ferdium.openNewWindow(url); |