diff options
author | Vijay A <avijayr@protonmail.com> | 2021-07-31 15:28:23 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-07-31 15:28:23 +0530 |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/office365-owa | |
parent | Allow any url in the custom-service to allow for sites like 'http://translate... (diff) | |
download | ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.gz ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.zst ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.zip |
Fixed eslintrc as root for this folder; Reformatted all files.
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 | }; |