diff options
author | Vijay A <avijayr@protonmail.com> | 2021-09-19 07:26:25 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-09-19 09:11:55 +0530 |
commit | 7517a409a1a502c747eb4598492a88cec4e8d58c (patch) | |
tree | 7b6b603b0831845ac07fe6ab8e4c52bf19c8e850 /recipes/twitter/webview.js | |
parent | Merge pull request #713 from kris7t/fix-api-access (diff) | |
download | ferdium-recipes-7517a409a1a502c747eb4598492a88cec4e8d58c.tar.gz ferdium-recipes-7517a409a1a502c747eb4598492a88cec4e8d58c.tar.zst ferdium-recipes-7517a409a1a502c747eb4598492a88cec4e8d58c.zip |
fix: fix js error; styling
Diffstat (limited to 'recipes/twitter/webview.js')
-rw-r--r-- | recipes/twitter/webview.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/recipes/twitter/webview.js b/recipes/twitter/webview.js index 39a704e..dfd06d1 100644 --- a/recipes/twitter/webview.js +++ b/recipes/twitter/webview.js | |||
@@ -6,11 +6,11 @@ module.exports = Ferdi => { | |||
6 | // "unread items". Sum the values for direct badge. | 6 | // "unread items". Sum the values for direct badge. |
7 | const notificationsElement = document.querySelector('[data-testid=AppTabBar_Notifications_Link] div div div'); | 7 | const notificationsElement = document.querySelector('[data-testid=AppTabBar_Notifications_Link] div div div'); |
8 | if (notificationsElement) { | 8 | if (notificationsElement) { |
9 | direct += notificationsElement.innerHTML; | 9 | direct += Ferdi.safeParseInt(notificationsElement.innerHTML); |
10 | } | 10 | } |
11 | const DMElement = document.querySelector('[data-testid=AppTabBar_DirectMessage_Link] div div div'); | 11 | const DMElement = document.querySelector('[data-testid=AppTabBar_DirectMessage_Link] div div div'); |
12 | if (DMElement) { | 12 | if (DMElement) { |
13 | direct += DMElement.innerHTML; | 13 | direct += Ferdi.safeParseInt(DMElement.innerHTML); |
14 | } | 14 | } |
15 | 15 | ||
16 | Ferdi.setBadge(direct); | 16 | Ferdi.setBadge(direct); |