diff options
author | Bennett <hello@vantezzen.io> | 2020-10-04 16:30:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-04 16:30:25 +0200 |
commit | 334da89f600225808302e708164d700858fc4856 (patch) | |
tree | f65ed873606db1df23ca4e761db9f3b585309952 /recipes/yahoo-mail/webview.js | |
parent | Merge pull request #307 from kris7t/gmail-unread-count (diff) | |
parent | Fixing PR comments: changed name to 'Yahoo Mail' and id to 'yahoo-mail'. (diff) | |
download | ferdium-recipes-334da89f600225808302e708164d700858fc4856.tar.gz ferdium-recipes-334da89f600225808302e708164d700858fc4856.tar.zst ferdium-recipes-334da89f600225808302e708164d700858fc4856.zip |
Merge pull request #310 from vraravam/yahoomail-recipe
Added recipe for yahoo mail.
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 | }; | ||