aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/yahoo-mail/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/yahoo-mail/webview.js')
-rw-r--r--recipes/yahoo-mail/webview.js11
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
3module.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};