aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Nikolay Khodov <i@valt.me>2023-10-18 01:00:05 +0200
committerLibravatar GitHub <noreply@github.com>2023-10-18 00:00:05 +0100
commit733c37922321c0cfb7a63c23e105a316dc4d0f1b (patch)
tree5502a429d5c15ed3f6f296f30855426d421eca73
parentMake the validation checks more noticeable (#437) (diff)
downloadferdium-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
-rw-r--r--recipes/telegram/index.js25
-rw-r--r--recipes/telegram/package.json2
2 files changed, 25 insertions, 2 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 @@
1module.exports = Ferdium => Ferdium; 1function instrumenEnvironment(webview) {
2 webview.executeJavaScript(`
3 (function() {
4 if(window.electron) {
5 return;
6 }
7
8 window.electron = { };
9 })();
10 `);
11}
12module.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 };
diff --git a/recipes/telegram/package.json b/recipes/telegram/package.json
index 680b254..615c7dd 100644
--- a/recipes/telegram/package.json
+++ b/recipes/telegram/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "telegram", 2 "id": "telegram",
3 "name": "Telegram", 3 "name": "Telegram",
4 "version": "3.4.3", 4 "version": "3.4.4",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://web.telegram.org", 7 "serviceURL": "https://web.telegram.org",