diff options
Diffstat (limited to 'recipes/telegram/webview.js')
-rw-r--r-- | recipes/telegram/webview.js | 13 |
1 files changed, 6 insertions, 7 deletions
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 : ''); |