diff options
Diffstat (limited to 'recipes/circuit')
-rw-r--r-- | recipes/circuit/package.json | 2 | ||||
-rw-r--r-- | recipes/circuit/webview.js | 4 |
2 files changed, 4 insertions, 2 deletions
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 = () => { |