diff options
author | 2019-10-28 22:01:47 +0100 | |
---|---|---|
committer | 2019-10-28 22:01:47 +0100 | |
commit | 79fd499edab0efc1c81081308faad02f96c03866 (patch) | |
tree | 117fee495b3a9540ff8110ea94404d15f7a7b48c /uncompressed/clickup/webview.js | |
parent | Serve recipe icons from recipe repo (diff) | |
download | ferdium-recipes-79fd499edab0efc1c81081308faad02f96c03866.tar.gz ferdium-recipes-79fd499edab0efc1c81081308faad02f96c03866.tar.zst ferdium-recipes-79fd499edab0efc1c81081308faad02f96c03866.zip |
add clickup
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 | }; | ||