Skip to content

Commit

Permalink
Fix telegram deeplink by adding empty onload
Browse files Browse the repository at this point in the history
  • Loading branch information
SpecialAro committed Aug 23, 2023
1 parent 1f0a940 commit dec35a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion recipes/telegram/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "telegram",
"name": "Telegram",
"version": "3.4.1",
"version": "3.4.2",
"license": "MIT",
"config": {
"serviceURL": "https://web.telegram.org",
Expand Down
3 changes: 3 additions & 0 deletions recipes/telegram/webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ module.exports = (Ferdium, settings) => {

Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));

// This is a hack to get the telegram web app to open links in Ferdium (otherwise it asks to deeplink and open with any tg:// protocol handler)
window.onload(() => {});

// TODO: See how this can be moved into the main ferdium app and sent as an ipc message for opening with a new window or same Ferdium recipe's webview based on user's preferences
document.addEventListener(
'click',
Expand Down

0 comments on commit dec35a5

Please sign in to comment.