diff options
author | 2021-08-31 16:25:57 +0530 | |
---|---|---|
committer | 2021-08-31 16:25:57 +0530 | |
commit | dfae2d231e39c81827d08fd8834d736c5b3005b1 (patch) | |
tree | 5037b401e7de837fdd6046a3c61ac76aed240e6e /recipes/jira/webview.js | |
parent | New recipe: odoo (diff) | |
download | ferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.tar.gz ferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.tar.zst ferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.zip |
refactor: Use Ferdi.safeParseInt to ensure that parsing is done consistently in all recipes.
Diffstat (limited to 'recipes/jira/webview.js')
-rw-r--r-- | recipes/jira/webview.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/recipes/jira/webview.js b/recipes/jira/webview.js index f52235d..d39f91e 100644 --- a/recipes/jira/webview.js +++ b/recipes/jira/webview.js | |||
@@ -2,10 +2,7 @@ module.exports = (Ferdi) => { | |||
2 | const getMessages = function getMessages() { | 2 | const getMessages = function getMessages() { |
3 | // get unread messages | 3 | // get unread messages |
4 | const element = document.querySelector('#atlassian-navigation-notification-count span'); | 4 | const element = document.querySelector('#atlassian-navigation-notification-count span'); |
5 | let count = element ? element.innerText : 0; | 5 | Ferdi.setBadge(element ? element.innerText : 0); |
6 | count = parseInt(count, 10); | ||
7 | |||
8 | Ferdi.setBadge(count); | ||
9 | }; | 6 | }; |
10 | 7 | ||
11 | Ferdi.loop(getMessages); | 8 | Ferdi.loop(getMessages); |