aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/nomadlist/webview.js
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-27 18:13:24 +0530
committerLibravatar GitHub <noreply@github.com>2021-08-27 18:13:24 +0530
commit155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch)
treed144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/nomadlist/webview.js
parentdocs: fixed template file for creating recipe. (diff)
downloadferdium-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/nomadlist/webview.js')
-rw-r--r--recipes/nomadlist/webview.js20
1 files changed, 3 insertions, 17 deletions
diff --git a/recipes/nomadlist/webview.js b/recipes/nomadlist/webview.js
index be1040c..1afaa1c 100644
--- a/recipes/nomadlist/webview.js
+++ b/recipes/nomadlist/webview.js
@@ -1,21 +1,7 @@
1const path = require('path'); 1module.exports = (Ferdi) => {
2
3module.exports = (Franz, options) => {
4 const getMessages = () => { 2 const getMessages = () => {
5 // get unread messages 3 Ferdi.setBadge($('.unread').length);
6 // const updates = document.getElementById('franz').getAttribute('data-unread');
7 const count = $('.unread').length;
8 Franz.setBadge(count);
9
10 // get conversations in 'My Inbox'
11 // const inbox = document.getElementById('franz').getAttribute('data-inbox');
12
13 // set Franz badge
14 // updates => active unread count
15 // inbox => passive unread count
16 // Franz.setBadge(updates, inbox);
17 }; 4 };
18 5
19 // check for new messages every second and update Franz badge 6 Ferdi.loop(getMessages);
20 Franz.loop(getMessages);
21}; 7};