diff options
Diffstat (limited to 'uncompressed/clickup/webview.js')
-rw-r--r-- | uncompressed/clickup/webview.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/uncompressed/clickup/webview.js b/uncompressed/clickup/webview.js new file mode 100644 index 0000000..cd3afed --- /dev/null +++ b/uncompressed/clickup/webview.js | |||
@@ -0,0 +1,17 @@ | |||
1 | import path from 'path'; | ||
2 | |||
3 | module.exports = (Franz) => { | ||
4 | const getMessages = function getMessages() { | ||
5 | // get unread messages | ||
6 | const count = document.querySelectorAll('.guilds-wrapper .badge').length; | ||
7 | |||
8 | // set Franz badge | ||
9 | Franz.setBadge(count); | ||
10 | }; | ||
11 | |||
12 | // check for new messages every second and update Franz badge | ||
13 | Franz.loop(getMessages); | ||
14 | |||
15 | // Hide download message | ||
16 | Franz.injectCSS(path.join(__dirname, 'service.css')); | ||
17 | }; | ||