aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/element
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
commit97697e3d069972844b2912a93022f4a4904a40d6 (patch)
tree53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/element
parentAllow any url in the custom-service to allow for sites like 'http://translate... (diff)
downloadferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.gz
ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.zst
ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.zip
Fixed eslintrc as root for this folder; Reformatted all files.
Diffstat (limited to 'recipes/element')
-rw-r--r--recipes/element/index.js2
-rw-r--r--recipes/element/webview.js6
2 files changed, 2 insertions, 6 deletions
diff --git a/recipes/element/index.js b/recipes/element/index.js
index 17daa35..258da41 100644
--- a/recipes/element/index.js
+++ b/recipes/element/index.js
@@ -1,3 +1 @@
1"use strict";
2
3module.exports = Franz => Franz; module.exports = Franz => Franz;
diff --git a/recipes/element/webview.js b/recipes/element/webview.js
index 7ccf97b..22ff738 100644
--- a/recipes/element/webview.js
+++ b/recipes/element/webview.js
@@ -1,5 +1,3 @@
1'use strict';
2
3module.exports = Franz => { 1module.exports = Franz => {
4 function getMessages() { 2 function getMessages() {
5 const badges = document.querySelectorAll('.mx_RoomSublist:not(.mx_RoomSublist_hidden) .mx_RoomSublist_badgeContainer'); 3 const badges = document.querySelectorAll('.mx_RoomSublist:not(.mx_RoomSublist_hidden) .mx_RoomSublist_badgeContainer');
@@ -7,13 +5,13 @@ module.exports = Franz => {
7 // Number of messages from People 5 // Number of messages from People
8 let direct_count = 0; 6 let direct_count = 0;
9 if (badges.length > 0 && badges[0].children.length > 0) { 7 if (badges.length > 0 && badges[0].children.length > 0) {
10 direct_count = parseInt(badges[0].textContent) 8 direct_count = parseInt(badges[0].textContent);
11 } 9 }
12 10
13 // Number of messages from Rooms 11 // Number of messages from Rooms
14 let indirect_count = 0; 12 let indirect_count = 0;
15 if (badges.length > 1 && badges[1].children.length > 0) { 13 if (badges.length > 1 && badges[1].children.length > 0) {
16 indirect_count = parseInt(badges[1].textContent) 14 indirect_count = parseInt(badges[1].textContent);
17 } 15 }
18 16
19 // set Franz badge 17 // set Franz badge