diff options
author | 2023-10-18 01:00:05 +0200 | |
---|---|---|
committer | 2023-10-18 00:00:05 +0100 | |
commit | 733c37922321c0cfb7a63c23e105a316dc4d0f1b (patch) | |
tree | 5502a429d5c15ed3f6f296f30855426d421eca73 /recipes/telegram/index.js | |
parent | Make the validation checks more noticeable (#437) (diff) | |
download | ferdium-recipes-733c37922321c0cfb7a63c23e105a316dc4d0f1b.tar.gz ferdium-recipes-733c37922321c0cfb7a63c23e105a316dc4d0f1b.tar.zst ferdium-recipes-733c37922321c0cfb7a63c23e105a316dc4d0f1b.zip |
Fix message notifications in Telegram (#439)
* Fix message notifications in Telegram
* Update index.js
* Bump version to 3.4.4
* Update namespace
* Fix lint issue
* Fix lint errors
Diffstat (limited to 'recipes/telegram/index.js')
-rw-r--r-- | recipes/telegram/index.js | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/recipes/telegram/index.js b/recipes/telegram/index.js index dd41f72..ac618ae 100644 --- a/recipes/telegram/index.js +++ b/recipes/telegram/index.js | |||
@@ -1 +1,24 @@ | |||
1 | module.exports = Ferdium => Ferdium; | 1 | function instrumenEnvironment(webview) { |
2 | webview.executeJavaScript(` | ||
3 | (function() { | ||
4 | if(window.electron) { | ||
5 | return; | ||
6 | } | ||
7 | |||
8 | window.electron = { }; | ||
9 | })(); | ||
10 | `); | ||
11 | } | ||
12 | module.exports = Ferdium => | ||
13 | class Telegram extends Ferdium { | ||
14 | // https://www.electronjs.org/docs/latest/api/webview-tag/#dom-events | ||
15 | get events() { | ||
16 | return { | ||
17 | 'load-commit': 'loadCommit', | ||
18 | }; | ||
19 | } | ||
20 | |||
21 | loadCommit(event) { | ||
22 | instrumenEnvironment(event.target); | ||
23 | } | ||
24 | }; | ||