aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/office365-owa
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
commit97697e3d069972844b2912a93022f4a4904a40d6 (patch)
tree53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/office365-owa
parentAllow any url in the custom-service to allow for sites like 'http://translate... (diff)
downloadferdium-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.js13
-rw-r--r--recipes/office365-owa/webview.js6
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 @@
1var os = require('os') 1const os = require('os');
2 2
3module.exports = Ferdi => 3module.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
3module.exports = Ferdi => { 1module.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};