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