diff options
author | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2021-09-12 13:08:33 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-12 07:38:33 +0000 |
commit | 4b3385094ba8a89247be421c81603a8dcbc99753 (patch) | |
tree | 16ccbf79244e55b36af0f5aa9298b93eda5f0402 /recipes/misskey/webview.js | |
parent | New recipe: 'clockwise' (#692) (diff) | |
download | ferdium-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.js | 9 |
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 @@ | |||
1 | module.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 | }; | ||