aboutsummaryrefslogtreecommitdiffstats
path: root/uncompressed/hackmd/webview.js
diff options
context:
space:
mode:
authorLibravatar Quentin Goinaud <armaldio@gmail.com>2019-10-28 22:11:35 +0100
committerLibravatar Quentin Goinaud <armaldio@gmail.com>2019-10-28 22:11:35 +0100
commit4de42fadc366706060541ca3c42245c23da63217 (patch)
tree5fbe892b6be714f9bff085367ca6c36e1025742e /uncompressed/hackmd/webview.js
parentServe recipe icons from recipe repo (diff)
downloadferdium-recipes-4de42fadc366706060541ca3c42245c23da63217.tar.gz
ferdium-recipes-4de42fadc366706060541ca3c42245c23da63217.tar.zst
ferdium-recipes-4de42fadc366706060541ca3c42245c23da63217.zip
add hackmd
Diffstat (limited to 'uncompressed/hackmd/webview.js')
-rw-r--r--uncompressed/hackmd/webview.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/uncompressed/hackmd/webview.js b/uncompressed/hackmd/webview.js
new file mode 100644
index 0000000..cd3afed
--- /dev/null
+++ b/uncompressed/hackmd/webview.js
@@ -0,0 +1,17 @@
1import path from 'path';
2
3module.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};