diff options
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); |