diff options
author | Sampath Kumar Krishnan <sampathBlam@users.noreply.github.com> | 2020-04-17 14:27:07 +0530 |
---|---|---|
committer | Sampath Kumar Krishnan <sampathBlam@users.noreply.github.com> | 2020-04-17 14:27:07 +0530 |
commit | e4d3e6e3ccdf1b2b24e1a1171b7776c2cd9ca7a6 (patch) | |
tree | 0b7c05b43cd12fce7081e0925f509be2f9d2d935 | |
parent | feature: Add jitsi recipe for ferdi (diff) | |
download | ferdium-recipes-e4d3e6e3ccdf1b2b24e1a1171b7776c2cd9ca7a6.tar.gz ferdium-recipes-e4d3e6e3ccdf1b2b24e1a1171b7776c2cd9ca7a6.tar.zst ferdium-recipes-e4d3e6e3ccdf1b2b24e1a1171b7776c2cd9ca7a6.zip |
fix: Add notification support for jitsi
- Add the code provided by @vantezzen to webview.js
- Change name from Franz to Ferdi in index.js
- Update version to 1.0.1
-rw-r--r-- | all.json | 2 | ||||
-rw-r--r-- | archives/jitsi.tar.gz | bin | 110269 -> 110471 bytes | |||
-rw-r--r-- | uncompressed/jitsi/index.js | 2 | ||||
-rw-r--r-- | uncompressed/jitsi/package.json | 2 | ||||
-rw-r--r-- | uncompressed/jitsi/webview.js | 13 |
5 files changed, 16 insertions, 3 deletions
@@ -422,7 +422,7 @@ | |||
422 | "featured": false, | 422 | "featured": false, |
423 | "id": "jitsi", | 423 | "id": "jitsi", |
424 | "name": "Jitsi", | 424 | "name": "Jitsi", |
425 | "version": "1.0.0", | 425 | "version": "1.0.1", |
426 | "icons": { | 426 | "icons": { |
427 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/jitsi/icon.png", | 427 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/jitsi/icon.png", |
428 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/jitsi/icon.svg" | 428 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/jitsi/icon.svg" |
diff --git a/archives/jitsi.tar.gz b/archives/jitsi.tar.gz index a6f4450..993bb34 100644 --- a/archives/jitsi.tar.gz +++ b/archives/jitsi.tar.gz | |||
Binary files differ | |||
diff --git a/uncompressed/jitsi/index.js b/uncompressed/jitsi/index.js index f6f75e3..74b9592 100644 --- a/uncompressed/jitsi/index.js +++ b/uncompressed/jitsi/index.js | |||
@@ -1,2 +1,2 @@ | |||
1 | "use strict"; | 1 | "use strict"; |
2 | module.exports = Franz => Franz; \ No newline at end of file | 2 | module.exports = Ferdi => Ferdi; \ No newline at end of file |
diff --git a/uncompressed/jitsi/package.json b/uncompressed/jitsi/package.json index 35841e3..cddd8f0 100644 --- a/uncompressed/jitsi/package.json +++ b/uncompressed/jitsi/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "jitsi", | 2 | "id": "jitsi", |
3 | "name": "Jitsi", | 3 | "name": "Jitsi", |
4 | "version": "1.0.0", | 4 | "version": "1.0.1", |
5 | "description": "Jitsi", | 5 | "description": "Jitsi", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Sampath Kumar Krishnan <sampath3493@gmail.com>", | 7 | "author": "Sampath Kumar Krishnan <sampath3493@gmail.com>", |
diff --git a/uncompressed/jitsi/webview.js b/uncompressed/jitsi/webview.js index 3918c74..563a3cf 100644 --- a/uncompressed/jitsi/webview.js +++ b/uncompressed/jitsi/webview.js | |||
@@ -1 +1,14 @@ | |||
1 | "use strict"; | 1 | "use strict"; |
2 | |||
3 | const NOTIFICATION_BADGE_CLASS = '.badge-round'; | ||
4 | |||
5 | module.exports = Ferdi => { | ||
6 | const getMessages = () => { | ||
7 | const badges = [...document.querySelectorAll(NOTIFICATION_BADGE_CLASS)]; | ||
8 | const messages = badges.reduce((currentValue, element) => currentValue + Number(element.innerText), 0); | ||
9 | |||
10 | Ferdi.setBadge(messages); | ||
11 | } | ||
12 | |||
13 | Ferdi.loop(getMessages); | ||
14 | } \ No newline at end of file | ||