diff options
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/telegram/package.json | 2 | ||||
-rw-r--r-- | recipes/telegram/webview.js | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/recipes/telegram/package.json b/recipes/telegram/package.json index acc0a54..54843eb 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.3.0", | 4 | "version": "3.3.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://web.telegram.org", | 7 | "serviceURL": "https://web.telegram.org", |
diff --git a/recipes/telegram/webview.js b/recipes/telegram/webview.js index f05b43f..632aff0 100644 --- a/recipes/telegram/webview.js +++ b/recipes/telegram/webview.js | |||
@@ -9,7 +9,6 @@ module.exports = Ferdium => { | |||
9 | .querySelector('meta[name="application-name"]') | 9 | .querySelector('meta[name="application-name"]') |
10 | ?.getAttribute('content'); | 10 | ?.getAttribute('content'); |
11 | 11 | ||
12 | const isWebZ = telegramVersion?.includes('WebZ'); | ||
13 | const isWebK = telegramVersion?.includes('WebK'); | 12 | const isWebK = telegramVersion?.includes('WebK'); |
14 | 13 | ||
15 | // There are two different Telegram versions for internal competition | 14 | // There are two different Telegram versions for internal competition |
@@ -60,20 +59,20 @@ module.exports = Ferdium => { | |||
60 | }; | 59 | }; |
61 | 60 | ||
62 | const getMessages = () => { | 61 | const getMessages = () => { |
63 | if (isWebZ) { | 62 | if (isWebK) { |
64 | webZCount(); | ||
65 | } else if (isWebK) { | ||
66 | webKCount(); | 63 | webKCount(); |
64 | } else { | ||
65 | webZCount(); | ||
67 | } | 66 | } |
68 | }; | 67 | }; |
69 | 68 | ||
70 | const getActiveDialogTitle = () => { | 69 | const getActiveDialogTitle = () => { |
71 | let element; | 70 | let element; |
72 | 71 | ||
73 | if (isWebZ) { | 72 | if (isWebK) { |
74 | element = document.querySelector('.chat-list .ListItem .title > h3'); | ||
75 | } else if (isWebK) { | ||
76 | element = document.querySelector('.top .peer-title'); | 73 | element = document.querySelector('.top .peer-title'); |
74 | } else { | ||
75 | element = document.querySelector('.chat-list .ListItem .title > h3'); | ||
77 | } | 76 | } |
78 | 77 | ||
79 | Ferdium.setDialogTitle(element ? element.textContent : ''); | 78 | Ferdium.setDialogTitle(element ? element.textContent : ''); |