aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/facebook/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/facebook/webview.js')
-rwxr-xr-xrecipes/facebook/webview.js16
1 files changed, 3 insertions, 13 deletions
diff --git a/recipes/facebook/webview.js b/recipes/facebook/webview.js
index d9e8687..1ff8558 100755
--- a/recipes/facebook/webview.js
+++ b/recipes/facebook/webview.js
@@ -2,19 +2,9 @@ module.exports = Ferdium => {
2 const getNotifications = function getNotifications() { 2 const getNotifications = function getNotifications() {
3 let count = 0; 3 let count = 0;
4 4
5 const elements = [ 5 const queryList = document.querySelectorAll('.bp9cbjyn.bwm1u5wc.pq6dq46d.datstx6m.taijpn5t.jb3vyjys.jxrgncrl.qt6c0cv9.qnrpqo6b.k4urcfbm');
6 document.querySelector('#requestsCountValue'), 6 for (const element of queryList) {
7 // document.getElementById('mercurymessagesCountValue'), 7 count += Ferdium.safeParseInt(element.textContent);
8 document.querySelector('#notificationsCountValue'),
9 document.querySelector(
10 '.k4urcfbm.qnrpqo6b.qt6c0cv9.jxrgncrl.jb3vyjys.taijpn5t.datstx6m.pq6dq46d.ljqsnud1.bp9cbjyn',
11 ),
12 ];
13
14 for (const element of elements) {
15 if (element !== null) {
16 count += Ferdium.safeParseInt(element.textContent);
17 }
18 } 8 }
19 9
20 Ferdium.setBadge(count); 10 Ferdium.setBadge(count);