aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/jira
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-08-31 16:25:57 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-08-31 16:25:57 +0530
commitdfae2d231e39c81827d08fd8834d736c5b3005b1 (patch)
tree5037b401e7de837fdd6046a3c61ac76aed240e6e /recipes/jira
parentNew recipe: odoo (diff)
downloadferdium-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')
-rw-r--r--recipes/jira/package.json2
-rw-r--r--recipes/jira/webview.js5
2 files changed, 2 insertions, 5 deletions
diff --git a/recipes/jira/package.json b/recipes/jira/package.json
index 09ace99..23d77a1 100644
--- a/recipes/jira/package.json
+++ b/recipes/jira/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "jira", 2 "id": "jira",
3 "name": "Jira", 3 "name": "Jira",
4 "version": "1.3.0", 4 "version": "1.3.1",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://{teamId}.atlassian.net", 7 "serviceURL": "https://{teamId}.atlassian.net",
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);