diff options
Diffstat (limited to 'recipes/steamchat/webview.js')
-rw-r--r-- | recipes/steamchat/webview.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/steamchat/webview.js b/recipes/steamchat/webview.js index 2990131..cfe84f3 100644 --- a/recipes/steamchat/webview.js +++ b/recipes/steamchat/webview.js | |||
@@ -1,18 +1,18 @@ | |||
1 | module.exports = Ferdi => { | 1 | module.exports = Ferdium => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | // get new msg count | 3 | // get new msg count |
4 | let count = 0; | 4 | let count = 0; |
5 | const counters = document.querySelectorAll('[class*=FriendMessageCount]'); | 5 | const counters = document.querySelectorAll('[class*=FriendMessageCount]'); |
6 | Array.prototype.filter.call(counters, countValue => { | 6 | Array.prototype.filter.call(counters, countValue => { |
7 | if (countValue) { | 7 | if (countValue) { |
8 | count += Ferdi.safeParseInt(countValue.textContent); | 8 | count += Ferdium.safeParseInt(countValue.textContent); |
9 | } | 9 | } |
10 | }); | 10 | }); |
11 | 11 | ||
12 | const indirectMessages = document.querySelectorAll( | 12 | const indirectMessages = document.querySelectorAll( |
13 | '[class*=ChatUnreadMessageIndicator]', | 13 | '[class*=ChatUnreadMessageIndicator]', |
14 | ).length; | 14 | ).length; |
15 | Ferdi.setBadge(count, indirectMessages); | 15 | Ferdium.setBadge(count, indirectMessages); |
16 | 16 | ||
17 | // force scroll to bottom of chat window | 17 | // force scroll to bottom of chat window |
18 | const chatBoxes = document.querySelectorAll('.chat_dialog'); | 18 | const chatBoxes = document.querySelectorAll('.chat_dialog'); |
@@ -28,7 +28,7 @@ module.exports = Ferdi => { | |||
28 | } | 28 | } |
29 | }; | 29 | }; |
30 | 30 | ||
31 | Ferdi.loop(getMessages); | 31 | Ferdium.loop(getMessages); |
32 | 32 | ||
33 | document.addEventListener( | 33 | document.addEventListener( |
34 | 'click', | 34 | 'click', |
@@ -38,7 +38,7 @@ module.exports = Ferdi => { | |||
38 | if (link && link.getAttribute('target') === '_top') { | 38 | if (link && link.getAttribute('target') === '_top') { |
39 | event.preventDefault(); | 39 | event.preventDefault(); |
40 | event.stopPropagation(); | 40 | event.stopPropagation(); |
41 | Ferdi.openNewWindow(link.getAttribute('href')); | 41 | Ferdium.openNewWindow(link.getAttribute('href')); |
42 | } | 42 | } |
43 | }, | 43 | }, |
44 | true, | 44 | true, |