diff options
Diffstat (limited to 'recipes/stackoverflow-chat/webview.js')
-rw-r--r-- | recipes/stackoverflow-chat/webview.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/recipes/stackoverflow-chat/webview.js b/recipes/stackoverflow-chat/webview.js index 622d764..aa5bde6 100644 --- a/recipes/stackoverflow-chat/webview.js +++ b/recipes/stackoverflow-chat/webview.js | |||
@@ -1,13 +1,13 @@ | |||
1 | module.exports = Ferdi => { | 1 | module.exports = Ferdium => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | const unreadSpan = document.querySelector( | 3 | const unreadSpan = document.querySelector( |
4 | 'span.flag-count.message-count.unread-count', | 4 | 'span.flag-count.message-count.unread-count', |
5 | ); | 5 | ); |
6 | let directCount = 0; | 6 | let directCount = 0; |
7 | if (unreadSpan) { | 7 | if (unreadSpan) { |
8 | directCount = Ferdi.safeParseInt(unreadSpan.textContent); | 8 | directCount = Ferdium.safeParseInt(unreadSpan.textContent); |
9 | } | 9 | } |
10 | Ferdi.setBadge(directCount); | 10 | Ferdium.setBadge(directCount); |
11 | }; | 11 | }; |
12 | Ferdi.loop(getMessages); | 12 | Ferdium.loop(getMessages); |
13 | }; | 13 | }; |