diff options
author | 2022-04-18 06:51:50 -0500 | |
---|---|---|
committer | 2022-04-18 06:51:50 -0500 | |
commit | 18801ed0c02627e87639dc0848cab44dacc18be2 (patch) | |
tree | 15e56ba66c68bf7b4594e6c9fdef44e037b4be31 /recipes/telegram/webview.js | |
parent | Remove deprecated webPreference flag (diff) | |
download | ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.tar.gz ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.tar.zst ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.zip |
Rebranded from 'ferdi' to 'ferdium' (companion changes for the main repo PR #2)
Diffstat (limited to 'recipes/telegram/webview.js')
-rw-r--r-- | recipes/telegram/webview.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/recipes/telegram/webview.js b/recipes/telegram/webview.js index d63282e..f05b43f 100644 --- a/recipes/telegram/webview.js +++ b/recipes/telegram/webview.js | |||
@@ -4,7 +4,7 @@ function _interopRequireDefault(obj) { | |||
4 | return obj && obj.__esModule ? obj : { default: obj }; | 4 | return obj && obj.__esModule ? obj : { default: obj }; |
5 | } | 5 | } |
6 | 6 | ||
7 | module.exports = Ferdi => { | 7 | module.exports = Ferdium => { |
8 | const telegramVersion = document | 8 | const telegramVersion = document |
9 | .querySelector('meta[name="application-name"]') | 9 | .querySelector('meta[name="application-name"]') |
10 | ?.getAttribute('content'); | 10 | ?.getAttribute('content'); |
@@ -26,14 +26,14 @@ module.exports = Ferdi => { | |||
26 | ); | 26 | ); |
27 | 27 | ||
28 | for (const badge of directCountSelector) { | 28 | for (const badge of directCountSelector) { |
29 | directCount += Ferdi.safeParseInt(badge.textContent); | 29 | directCount += Ferdium.safeParseInt(badge.textContent); |
30 | } | 30 | } |
31 | 31 | ||
32 | for (const badge of groupCountSelector) { | 32 | for (const badge of groupCountSelector) { |
33 | groupCount += Ferdi.safeParseInt(badge.textContent); | 33 | groupCount += Ferdium.safeParseInt(badge.textContent); |
34 | } | 34 | } |
35 | 35 | ||
36 | Ferdi.setBadge(directCount, groupCount); | 36 | Ferdium.setBadge(directCount, groupCount); |
37 | }; | 37 | }; |
38 | 38 | ||
39 | const webKCount = () => { | 39 | const webKCount = () => { |
@@ -46,7 +46,7 @@ module.exports = Ferdi => { | |||
46 | const subtitleBadge = element.querySelector('.dialog-subtitle-badge'); | 46 | const subtitleBadge = element.querySelector('.dialog-subtitle-badge'); |
47 | 47 | ||
48 | if (subtitleBadge) { | 48 | if (subtitleBadge) { |
49 | const parsedValue = Ferdi.safeParseInt(subtitleBadge.textContent); | 49 | const parsedValue = Ferdium.safeParseInt(subtitleBadge.textContent); |
50 | 50 | ||
51 | if (element.dataset.peerId > 0) { | 51 | if (element.dataset.peerId > 0) { |
52 | directCount += parsedValue; | 52 | directCount += parsedValue; |
@@ -56,7 +56,7 @@ module.exports = Ferdi => { | |||
56 | } | 56 | } |
57 | } | 57 | } |
58 | 58 | ||
59 | Ferdi.setBadge(directCount, groupCount); | 59 | Ferdium.setBadge(directCount, groupCount); |
60 | }; | 60 | }; |
61 | 61 | ||
62 | const getMessages = () => { | 62 | const getMessages = () => { |
@@ -76,7 +76,7 @@ module.exports = Ferdi => { | |||
76 | element = document.querySelector('.top .peer-title'); | 76 | element = document.querySelector('.top .peer-title'); |
77 | } | 77 | } |
78 | 78 | ||
79 | Ferdi.setDialogTitle(element ? element.textContent : ''); | 79 | Ferdium.setDialogTitle(element ? element.textContent : ''); |
80 | }; | 80 | }; |
81 | 81 | ||
82 | const loopFunc = () => { | 82 | const loopFunc = () => { |
@@ -84,7 +84,7 @@ module.exports = Ferdi => { | |||
84 | getActiveDialogTitle(); | 84 | getActiveDialogTitle(); |
85 | }; | 85 | }; |
86 | 86 | ||
87 | Ferdi.loop(loopFunc); | 87 | Ferdium.loop(loopFunc); |
88 | 88 | ||
89 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 89 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); |
90 | }; | 90 | }; |