aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Simon Szustkowski <mail@simonszu.de>2021-11-29 10:54:36 +0100
committerLibravatar GitHub <noreply@github.com>2021-11-29 15:24:36 +0530
commit63cea1d022e5aa2b0fa050ea346b4684a959a9ca (patch)
treec3f1fda6f303170e5b9361a8b72d16ca6cb8fb67
parentAdd RingCentral recipe (#776) (diff)
downloadferdium-recipes-63cea1d022e5aa2b0fa050ea346b4684a959a9ca.tar.gz
ferdium-recipes-63cea1d022e5aa2b0fa050ea346b4684a959a9ca.tar.zst
ferdium-recipes-63cea1d022e5aa2b0fa050ea346b4684a959a9ca.zip
Fixed unread badge for circuit (#777)
-rw-r--r--all.json2
-rw-r--r--recipes/circuit/package.json2
-rw-r--r--recipes/circuit/webview.js4
3 files changed, 5 insertions, 3 deletions
diff --git a/all.json b/all.json
index 03d2162..626bfa0 100644
--- a/all.json
+++ b/all.json
@@ -207,7 +207,7 @@
207 "featured": false, 207 "featured": false,
208 "id": "circuit", 208 "id": "circuit",
209 "name": "Circuit", 209 "name": "Circuit",
210 "version": "1.0.0", 210 "version": "1.0.1",
211 "icons": { 211 "icons": {
212 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/recipes/circuit/icon.svg" 212 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/recipes/circuit/icon.svg"
213 } 213 }
diff --git a/recipes/circuit/package.json b/recipes/circuit/package.json
index a569472..1beaa12 100644
--- a/recipes/circuit/package.json
+++ b/recipes/circuit/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "circuit", 2 "id": "circuit",
3 "name": "Circuit", 3 "name": "Circuit",
4 "version": "1.0.0", 4 "version": "1.0.1",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://eu.yourcircuit.com/" 7 "serviceURL": "https://eu.yourcircuit.com/"
diff --git a/recipes/circuit/webview.js b/recipes/circuit/webview.js
index ce74eef..b5e3fd5 100644
--- a/recipes/circuit/webview.js
+++ b/recipes/circuit/webview.js
@@ -8,8 +8,10 @@ module.exports = Ferdi => {
8 const titleValue = document.querySelector('title').text; 8 const titleValue = document.querySelector('title').text;
9 // Extract the number from the tag 9 // Extract the number from the tag
10 match = titleValue.match(/\d+/); 10 match = titleValue.match(/\d+/);
11 unread = match != null && match.length > 0 ? match[0] : 0;
11 // Set unread msgs badge 12 // Set unread msgs badge
12 Ferdi.setBadge(Ferdi.safeParseInt(match[0])); 13
14 Ferdi.setBadge(Ferdi.safeParseInt(unread));
13 }; 15 };
14 16
15 const loopFunc = () => { 17 const loopFunc = () => {