diff options
Diffstat (limited to 'recipes/office365-owa')
-rw-r--r-- | recipes/office365-owa/index.js | 13 | ||||
-rw-r--r-- | recipes/office365-owa/webview.js | 6 |
2 files changed, 8 insertions, 11 deletions
diff --git a/recipes/office365-owa/index.js b/recipes/office365-owa/index.js index 12994ff..5c59e64 100644 --- a/recipes/office365-owa/index.js +++ b/recipes/office365-owa/index.js | |||
@@ -1,8 +1,7 @@ | |||
1 | var os = require('os') | 1 | const os = require('os'); |
2 | 2 | ||
3 | module.exports = Ferdi => | 3 | module.exports = Ferdi => class Outlook extends Ferdi { |
4 | class Outlook extends Ferdi { | 4 | overrideUserAgent() { |
5 | overrideUserAgent() { | 5 | return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(); |
6 | return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g,"").trim(); | 6 | } |
7 | } | 7 | }; |
8 | }; | ||
diff --git a/recipes/office365-owa/webview.js b/recipes/office365-owa/webview.js index 6d4edf2..cb63219 100644 --- a/recipes/office365-owa/webview.js +++ b/recipes/office365-owa/webview.js | |||
@@ -1,5 +1,3 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | module.exports = Ferdi => { | 1 | module.exports = Ferdi => { |
4 | function getMessages() { | 2 | function getMessages() { |
5 | let unreadMail = 0; | 3 | let unreadMail = 0; |
@@ -10,7 +8,7 @@ module.exports = Ferdi => { | |||
10 | jQuery("span[title*='Inbox'] + div > span") | 8 | jQuery("span[title*='Inbox'] + div > span") |
11 | .first() | 9 | .first() |
12 | .text(), | 10 | .text(), |
13 | 10 | 11 | 10, |
14 | ); | 12 | ); |
15 | } else { | 13 | } else { |
16 | // new app | 14 | // new app |
@@ -29,6 +27,6 @@ module.exports = Ferdi => { | |||
29 | } | 27 | } |
30 | 28 | ||
31 | Ferdi.setBadge(unreadMail); | 29 | Ferdi.setBadge(unreadMail); |
32 | }; | 30 | } |
33 | Ferdi.loop(getMessages); | 31 | Ferdi.loop(getMessages); |
34 | }; | 32 | }; |