diff options
Diffstat (limited to 'recipes/mailbox.org/webview.js')
-rw-r--r-- | recipes/mailbox.org/webview.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/recipes/mailbox.org/webview.js b/recipes/mailbox.org/webview.js new file mode 100644 index 0000000..56cfa6e --- /dev/null +++ b/recipes/mailbox.org/webview.js | |||
@@ -0,0 +1,9 @@ | |||
1 | module.exports = (Franz) => { | ||
2 | const getMessages = function getMessages() { | ||
3 | const count = document.querySelectorAll('.new-item').length; | ||
4 | |||
5 | Franz.setBadge(count); | ||
6 | |||
7 | }; | ||
8 | Franz.loop(getMessages); | ||
9 | }; | ||