diff options
author | 2019-09-28 12:10:25 +0200 | |
---|---|---|
committer | 2019-09-28 12:10:25 +0200 | |
commit | 728d339739b63e9bb59e457e4a84fe9a65b93fc9 (patch) | |
tree | a0fc6180ea26fa9ef397458e8eb6491031d6437d /uncompressed/mattermost/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/mattermost/webview.js')
-rw-r--r-- | uncompressed/mattermost/webview.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/uncompressed/mattermost/webview.js b/uncompressed/mattermost/webview.js new file mode 100644 index 0000000..03258e0 --- /dev/null +++ b/uncompressed/mattermost/webview.js | |||
@@ -0,0 +1,13 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => { | ||
4 | const getMessages = function getMessages() { | ||
5 | const directMessages = document.querySelectorAll('.sidebar--left .has-badge .badge').length; | ||
6 | const allMessages = document.querySelectorAll('.sidebar--left .has-badge').length - directMessages; | ||
7 | const teamDirectMessages = document.querySelectorAll('.team-wrapper .team-container .badge').length; | ||
8 | const teamMessages = document.querySelectorAll('.team-wrapper .unread').length - teamDirectMessages; | ||
9 | Franz.setBadge(directMessages + teamDirectMessages, allMessages + teamMessages); | ||
10 | }; | ||
11 | |||
12 | Franz.loop(getMessages); | ||
13 | }; \ No newline at end of file | ||