diff options
author | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-08-27 18:13:24 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 18:13:24 +0530 |
commit | 155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch) | |
tree | d144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/jira/webview.js | |
parent | docs: fixed template file for creating recipe. (diff) | |
download | ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.gz ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.zst ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.zip |
chore: normalized all recipes to ensure compatibility with es6 (#639)
- Removed some calls to set badge with '0' all the time.
- Removed all 'sourceMaps' since they are all outdated atm.
Diffstat (limited to 'recipes/jira/webview.js')
-rw-r--r-- | recipes/jira/webview.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/recipes/jira/webview.js b/recipes/jira/webview.js index aca65be..f52235d 100644 --- a/recipes/jira/webview.js +++ b/recipes/jira/webview.js | |||
@@ -1,14 +1,12 @@ | |||
1 | module.exports = (Franz) => { | 1 | 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 | let count = element ? element.innerText : 0; |
6 | count = parseInt(count, 10); | 6 | count = parseInt(count, 10); |
7 | 7 | ||
8 | // set Franz badge | 8 | Ferdi.setBadge(count); |
9 | Franz.setBadge(count); | ||
10 | }; | 9 | }; |
11 | 10 | ||
12 | // check for new messages every second and update Franz badge | 11 | Ferdi.loop(getMessages); |
13 | Franz.loop(getMessages); | ||
14 | }; | 12 | }; |