diff options
author | 2019-09-28 12:10:25 +0200 | |
---|---|---|
committer | 2019-09-28 12:10:25 +0200 | |
commit | 728d339739b63e9bb59e457e4a84fe9a65b93fc9 (patch) | |
tree | a0fc6180ea26fa9ef397458e8eb6491031d6437d /uncompressed/teamwork-projects/webview.js | |
parent | Add list of recipes (diff) | |
download | ferdium-recipes-728d339739b63e9bb59e457e4a84fe9a65b93fc9.tar.gz ferdium-recipes-728d339739b63e9bb59e457e4a84fe9a65b93fc9.tar.zst ferdium-recipes-728d339739b63e9bb59e457e4a84fe9a65b93fc9.zip |
Add uncompressed recipes
Diffstat (limited to 'uncompressed/teamwork-projects/webview.js')
-rw-r--r-- | uncompressed/teamwork-projects/webview.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/uncompressed/teamwork-projects/webview.js b/uncompressed/teamwork-projects/webview.js new file mode 100644 index 0000000..c3f7d77 --- /dev/null +++ b/uncompressed/teamwork-projects/webview.js | |||
@@ -0,0 +1,18 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | module.exports = (Franz, options) => { | ||
4 | function getMessages() { | ||
5 | let count = 0; | ||
6 | let indirectCount = 0; | ||
7 | let badge = document.getElementById('numNotifs2'); | ||
8 | |||
9 | if (badge && badge.innerText) { | ||
10 | indirectCount = parseInt(badge.innerText); | ||
11 | } | ||
12 | |||
13 | Franz.setBadge(count, indirectCount); | ||
14 | } | ||
15 | |||
16 | Franz.loop(getMessages); | ||
17 | }; | ||
18 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlYW13b3JrLXByb2plY3RzL3dlYnZpZXcuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIkZyYW56Iiwib3B0aW9ucyIsImdldE1lc3NhZ2VzIiwiY291bnQiLCJpbmRpcmVjdENvdW50IiwiYmFkZ2UiLCJkb2N1bWVudCIsImdldEVsZW1lbnRCeUlkIiwiaW5uZXJUZXh0IiwicGFyc2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