diff options
Diffstat (limited to 'recipes/messenger/webview.js')
-rw-r--r-- | recipes/messenger/webview.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/recipes/messenger/webview.js b/recipes/messenger/webview.js index b146261..098c6f5 100644 --- a/recipes/messenger/webview.js +++ b/recipes/messenger/webview.js | |||
@@ -1,4 +1,4 @@ | |||
1 | module.exports = Franz => { | 1 | module.exports = Ferdi => { |
2 | const getMessages = function getMessages() { | 2 | const getMessages = function getMessages() { |
3 | let count = 0; | 3 | let count = 0; |
4 | 4 | ||
@@ -31,17 +31,18 @@ module.exports = Franz => { | |||
31 | count += parseInt(messageRequestsElement.innerHTML, 10); | 31 | count += parseInt(messageRequestsElement.innerHTML, 10); |
32 | } | 32 | } |
33 | 33 | ||
34 | Franz.setBadge(count); | 34 | Ferdi.setBadge(count); |
35 | }; | 35 | }; |
36 | 36 | ||
37 | Franz.loop(getMessages); | 37 | Ferdi.loop(getMessages); |
38 | |||
38 | localStorage.setItem('_cs_desktopNotifsEnabled', JSON.stringify({ | 39 | localStorage.setItem('_cs_desktopNotifsEnabled', JSON.stringify({ |
39 | __t: new Date().getTime(), | 40 | __t: new Date().getTime(), |
40 | __v: true, | 41 | __v: true, |
41 | })); | 42 | })); |
42 | 43 | ||
43 | if (typeof Franz.onNotify === 'function') { | 44 | if (typeof Ferdi.onNotify === 'function') { |
44 | Franz.onNotify(notification => { | 45 | Ferdi.onNotify(notification => { |
45 | if (typeof notification.title !== 'string') { | 46 | if (typeof notification.title !== 'string') { |
46 | notification.title = ((notification.title.props || {}).content || [])[0] || 'Messenger'; | 47 | notification.title = ((notification.title.props || {}).content || [])[0] || 'Messenger'; |
47 | } | 48 | } |