diff options
author | 2021-07-31 15:28:23 +0530 | |
---|---|---|
committer | 2021-07-31 15:28:23 +0530 | |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/jitsi/webview.js | |
parent | Allow any url in the custom-service to allow for sites like 'http://translate... (diff) | |
download | ferdium-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/jitsi/webview.js')
-rw-r--r-- | recipes/jitsi/webview.js | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/recipes/jitsi/webview.js b/recipes/jitsi/webview.js index 563a3cf..69c468e 100644 --- a/recipes/jitsi/webview.js +++ b/recipes/jitsi/webview.js | |||
@@ -1,14 +1,12 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | const NOTIFICATION_BADGE_CLASS = '.badge-round'; | 1 | const NOTIFICATION_BADGE_CLASS = '.badge-round'; |
4 | 2 | ||
5 | module.exports = Ferdi => { | 3 | module.exports = Ferdi => { |
6 | const getMessages = () => { | 4 | const getMessages = () => { |
7 | const badges = [...document.querySelectorAll(NOTIFICATION_BADGE_CLASS)]; | 5 | const badges = [...document.querySelectorAll(NOTIFICATION_BADGE_CLASS)]; |
8 | const messages = badges.reduce((currentValue, element) => currentValue + Number(element.innerText), 0); | 6 | const messages = badges.reduce((currentValue, element) => currentValue + Number(element.innerText), 0); |
9 | 7 | ||
10 | Ferdi.setBadge(messages); | 8 | Ferdi.setBadge(messages); |
11 | } | 9 | }; |
12 | 10 | ||
13 | Ferdi.loop(getMessages); | 11 | Ferdi.loop(getMessages); |
14 | } \ No newline at end of file | 12 | }; |