diff options
Diffstat (limited to 'recipes/slite/webview.js')
-rw-r--r-- | recipes/slite/webview.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/recipes/slite/webview.js b/recipes/slite/webview.js index d54b2d3..f1d9f32 100644 --- a/recipes/slite/webview.js +++ b/recipes/slite/webview.js | |||
@@ -1,7 +1,9 @@ | |||
1 | module.exports = Ferdi => { | 1 | module.exports = Ferdi => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | const element = document.querySelector("#app button[data-test-id='notificationsCount']"); | 3 | const element = document.querySelector( |
4 | Ferdi.setBadge(element ? Ferdi.safeParseInt(element.innerText) : 0); | 4 | "#app button[data-test-id='notificationsCount']", |
5 | ); | ||
6 | Ferdi.setBadge(element ? Ferdi.safeParseInt(element.textContent) : 0); | ||
5 | }; | 7 | }; |
6 | 8 | ||
7 | Ferdi.loop(getMessages); | 9 | Ferdi.loop(getMessages); |