diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2022-04-18 06:51:50 -0500 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2022-04-18 06:51:50 -0500 |
commit | 18801ed0c02627e87639dc0848cab44dacc18be2 (patch) | |
tree | 15e56ba66c68bf7b4594e6c9fdef44e037b4be31 /recipes/twitter/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/twitter/webview.js')
-rw-r--r-- | recipes/twitter/webview.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/twitter/webview.js b/recipes/twitter/webview.js index d88e3e4..d8341e4 100644 --- a/recipes/twitter/webview.js +++ b/recipes/twitter/webview.js | |||
@@ -1,4 +1,4 @@ | |||
1 | module.exports = Ferdi => { | 1 | module.exports = Ferdium => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | let direct = 0; | 3 | let direct = 0; |
4 | 4 | ||
@@ -8,17 +8,17 @@ module.exports = Ferdi => { | |||
8 | '[data-testid=AppTabBar_Notifications_Link] div div div', | 8 | '[data-testid=AppTabBar_Notifications_Link] div div div', |
9 | ); | 9 | ); |
10 | if (notificationsElement) { | 10 | if (notificationsElement) { |
11 | direct += Ferdi.safeParseInt(notificationsElement.textContent); | 11 | direct += Ferdium.safeParseInt(notificationsElement.textContent); |
12 | } | 12 | } |
13 | const DMElement = document.querySelector( | 13 | const DMElement = document.querySelector( |
14 | '[data-testid=AppTabBar_DirectMessage_Link] div div div', | 14 | '[data-testid=AppTabBar_DirectMessage_Link] div div div', |
15 | ); | 15 | ); |
16 | if (DMElement) { | 16 | if (DMElement) { |
17 | direct += Ferdi.safeParseInt(DMElement.textContent); | 17 | direct += Ferdium.safeParseInt(DMElement.textContent); |
18 | } | 18 | } |
19 | 19 | ||
20 | Ferdi.setBadge(direct); | 20 | Ferdium.setBadge(direct); |
21 | }; | 21 | }; |
22 | 22 | ||
23 | Ferdi.loop(getMessages); | 23 | Ferdium.loop(getMessages); |
24 | }; | 24 | }; |