aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/yahoo-mail/webview.js
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2020-10-04 18:20:12 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2020-10-04 18:52:59 +0530
commit786ca4fd25323d919ca6d9ec1851e6e53b70a303 (patch)
tree2a4cea69c5dadbf234da4cccac08e0d3c374285c /recipes/yahoo-mail/webview.js
parentMerge pull request #307 from kris7t/gmail-unread-count (diff)
downloadferdium-recipes-786ca4fd25323d919ca6d9ec1851e6e53b70a303.tar.gz
ferdium-recipes-786ca4fd25323d919ca6d9ec1851e6e53b70a303.tar.zst
ferdium-recipes-786ca4fd25323d919ca6d9ec1851e6e53b70a303.zip
Added recipe for yahoo mail.
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};