aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/misskey/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/misskey/webview.js')
-rw-r--r--recipes/misskey/webview.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/recipes/misskey/webview.js b/recipes/misskey/webview.js
new file mode 100644
index 0000000..b024ce1
--- /dev/null
+++ b/recipes/misskey/webview.js
@@ -0,0 +1,9 @@
1module.exports = (Ferdi) => {
2 const getMessages = function getMessages() {
3 // check notification badge for Ferdi badge
4 let hasNotification = !!document.querySelector('#app div.notifications > button > i.circle');
5 Ferdi.setBadge(0, hasNotification ? 1 : 0);
6 };
7
8 Ferdi.loop(getMessages);
9};