From 7517a409a1a502c747eb4598492a88cec4e8d58c Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sun, 19 Sep 2021 07:26:25 +0530 Subject: fix: fix js error; styling --- recipes/twitter/package.json | 2 +- recipes/twitter/webview.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'recipes/twitter') diff --git a/recipes/twitter/package.json b/recipes/twitter/package.json index cb840a5..83cf0fa 100644 --- a/recipes/twitter/package.json +++ b/recipes/twitter/package.json @@ -1,7 +1,7 @@ { "id": "twitter", "name": "Twitter", - "version": "1.2.0", + "version": "1.2.1", "license": "MIT", "repository": "https://github.com/getferdi/recipes", "config": { 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 => { // "unread items". Sum the values for direct badge. const notificationsElement = document.querySelector('[data-testid=AppTabBar_Notifications_Link] div div div'); if (notificationsElement) { - direct += notificationsElement.innerHTML; + direct += Ferdi.safeParseInt(notificationsElement.innerHTML); } const DMElement = document.querySelector('[data-testid=AppTabBar_DirectMessage_Link] div div div'); if (DMElement) { - direct += DMElement.innerHTML; + direct += Ferdi.safeParseInt(DMElement.innerHTML); } Ferdi.setBadge(direct); -- cgit v1.2.3-70-g09d2