diff options
Diffstat (limited to 'recipes/yahoo-mail/webview.js')
-rw-r--r-- | recipes/yahoo-mail/webview.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/recipes/yahoo-mail/webview.js b/recipes/yahoo-mail/webview.js new file mode 100644 index 0000000..1027838 --- /dev/null +++ b/recipes/yahoo-mail/webview.js | |||
@@ -0,0 +1,11 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = (Franz) => { | ||
4 | const getMessages = function getMessages() { | ||
5 | let count = document.querySelector('a[data-test-folder-name="Inbox"]').getAttribute('data-test-unread-count'); | ||
6 | Franz.setBadge(count); | ||
7 | }; | ||
8 | |||
9 | // check for new messages every second and update Franz badge | ||
10 | Franz.loop(getMessages); | ||
11 | }; | ||