diff options
Diffstat (limited to 'recipes/guilded/webview.js')
-rw-r--r-- | recipes/guilded/webview.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/recipes/guilded/webview.js b/recipes/guilded/webview.js index 5d56d39..c8d33f2 100644 --- a/recipes/guilded/webview.js +++ b/recipes/guilded/webview.js | |||
@@ -1,10 +1,10 @@ | |||
1 | module.exports = Ferdi => { | 1 | module.exports = Ferdi => { |
2 | const getMessages = function getMessages() { | 2 | const getMessages = () => { |
3 | let unread = 0; | 3 | let unread = 0; |
4 | const notificationBadge = document.getElementsByClassName('NavSelectorItem-unread-badge')[0]; | 4 | const notificationBadge = document.getElementsByClassName('NavSelectorItem-unread-badge')[0]; |
5 | if (notificationBadge != undefined) { | 5 | if (notificationBadge != undefined) { |
6 | const innerBadge = notificationBadge.getElementsByClassName('BadgeV2-count')[0]; | 6 | const innerBadge = notificationBadge.getElementsByClassName('BadgeV2-count')[0]; |
7 | unread = innerBadge.innerText; | 7 | unread = Ferdi.safeParseInt(innerBadge.innerText); |
8 | } | 8 | } |
9 | Ferdi.setBadge(unread); | 9 | Ferdi.setBadge(unread); |
10 | }; | 10 | }; |