aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/telegram-react/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/telegram-react/webview.js')
-rw-r--r--recipes/telegram-react/webview.js21
1 files changed, 0 insertions, 21 deletions
diff --git a/recipes/telegram-react/webview.js b/recipes/telegram-react/webview.js
deleted file mode 100644
index c17b200..0000000
--- a/recipes/telegram-react/webview.js
+++ /dev/null
@@ -1,21 +0,0 @@
1module.exports = Ferdi => {
2 const getMessages = () => {
3 let count = 0;
4 const elements = document.querySelectorAll('.chatlist > li:not(.is-muted)');
5 if (elements) {
6 for (const element of elements) {
7 if (
8 element.querySelector('.unread') &&
9 element.querySelector('.unread').textContent !== 0
10 ) {
11 count += Ferdi.safeParseInt(
12 element.querySelector('.unread').textContent,
13 );
14 }
15 }
16 }
17 Ferdi.setBadge(count);
18 };
19
20 Ferdi.loop(getMessages);
21};