aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/jitsi
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/jitsi
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/jitsi')
-rw-r--r--recipes/jitsi/index.js9
-rw-r--r--recipes/jitsi/webview.js20
2 files changed, 13 insertions, 16 deletions
diff --git a/recipes/jitsi/index.js b/recipes/jitsi/index.js
index 6e3a728..8de4268 100644
--- a/recipes/jitsi/index.js
+++ b/recipes/jitsi/index.js
@@ -1,6 +1,5 @@
1"use strict";
2module.exports = Franz => class Jitsi extends Franz { 1module.exports = Franz => class Jitsi extends Franz {
3 overrideUserAgent() { 2 overrideUserAgent() {
4 return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(); 3 return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim();
5 } 4 }
6} \ No newline at end of file 5};
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
3const NOTIFICATION_BADGE_CLASS = '.badge-round'; 1const NOTIFICATION_BADGE_CLASS = '.badge-round';
4 2
5module.exports = Ferdi => { 3module.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};