From c0146ce37126aa3ab8e1d5e744254e02054bb496 Mon Sep 17 00:00:00 2001 From: Victor B <39555268+victorbnl@users.noreply.github.com> Date: Thu, 20 Jul 2023 01:20:32 +0200 Subject: [PATCH] Open Telegram links within Ferdium (#394) --- recipes/telegram/package.json | 2 +- recipes/telegram/webview.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes/telegram/package.json b/recipes/telegram/package.json index 80bed06a8..85f331fb4 100644 --- a/recipes/telegram/package.json +++ b/recipes/telegram/package.json @@ -1,7 +1,7 @@ { "id": "telegram", "name": "Telegram", - "version": "3.3.5", + "version": "3.3.6", "license": "MIT", "config": { "serviceURL": "https://web.telegram.org", diff --git a/recipes/telegram/webview.js b/recipes/telegram/webview.js index 288160a97..a4133cadb 100644 --- a/recipes/telegram/webview.js +++ b/recipes/telegram/webview.js @@ -95,7 +95,11 @@ module.exports = (Ferdium, settings) => { event.preventDefault(); event.stopPropagation(); - if (settings.trapLinkClicks === true) { + if ( + settings.trapLinkClicks === true + || url.includes('t.me') + || url.includes('web.telegram.org') + ) { window.location.href = url; } else { Ferdium.openNewWindow(url);