aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/misskey/webview.js
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2021-09-12 13:08:33 +0530
committerLibravatar GitHub <noreply@github.com>2021-09-12 07:38:33 +0000
commit4b3385094ba8a89247be421c81603a8dcbc99753 (patch)
tree16ccbf79244e55b36af0f5aa9298b93eda5f0402 /recipes/misskey/webview.js
parentNew recipe: 'clockwise' (#692) (diff)
downloadferdium-recipes-4b3385094ba8a89247be421c81603a8dcbc99753.tar.gz
ferdium-recipes-4b3385094ba8a89247be421c81603a8dcbc99753.tar.zst
ferdium-recipes-4b3385094ba8a89247be421c81603a8dcbc99753.zip
New recipe: 'misskey' (#693)
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};