diff options
author | Simon Szustkowski <mail@simonszu.de> | 2021-11-29 10:54:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 15:24:36 +0530 |
commit | 63cea1d022e5aa2b0fa050ea346b4684a959a9ca (patch) | |
tree | c3f1fda6f303170e5b9361a8b72d16ca6cb8fb67 /recipes/circuit/webview.js | |
parent | Add RingCentral recipe (#776) (diff) | |
download | ferdium-recipes-63cea1d022e5aa2b0fa050ea346b4684a959a9ca.tar.gz ferdium-recipes-63cea1d022e5aa2b0fa050ea346b4684a959a9ca.tar.zst ferdium-recipes-63cea1d022e5aa2b0fa050ea346b4684a959a9ca.zip |
Fixed unread badge for circuit (#777)
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 = () => { |