diff options
Diffstat (limited to 'recipes/yahoo-mail')
-rw-r--r-- | recipes/yahoo-mail/index.js | 29 | ||||
-rw-r--r-- | recipes/yahoo-mail/webview.js | 4 |
2 files changed, 15 insertions, 18 deletions
diff --git a/recipes/yahoo-mail/index.js b/recipes/yahoo-mail/index.js index 599e93c..b52af44 100644 --- a/recipes/yahoo-mail/index.js +++ b/recipes/yahoo-mail/index.js | |||
@@ -1,15 +1,14 @@ | |||
1 | module.exports = (Franz) => | 1 | module.exports = (Franz) => class YahooMail extends Franz { |
2 | class YahooMail extends Franz { | 2 | modifyRequestHeaders() { |
3 | modifyRequestHeaders() { | 3 | return [ |
4 | return [ | 4 | { |
5 | { | 5 | headers: { |
6 | headers: { | 6 | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36', |
7 | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36', | 7 | }, |
8 | }, | 8 | requestFilters: { |
9 | requestFilters: { | 9 | urls: ['*://*/*'], |
10 | urls: ['*://*/*'], | 10 | }, |
11 | } | 11 | }, |
12 | } | 12 | ]; |
13 | ] | 13 | } |
14 | } | 14 | }; |
15 | }; | ||
diff --git a/recipes/yahoo-mail/webview.js b/recipes/yahoo-mail/webview.js index 1027838..fd5add1 100644 --- a/recipes/yahoo-mail/webview.js +++ b/recipes/yahoo-mail/webview.js | |||
@@ -1,8 +1,6 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = (Franz) => { | 1 | module.exports = (Franz) => { |
4 | const getMessages = function getMessages() { | 2 | const getMessages = function getMessages() { |
5 | let count = document.querySelector('a[data-test-folder-name="Inbox"]').getAttribute('data-test-unread-count'); | 3 | const count = document.querySelector('a[data-test-folder-name="Inbox"]').getAttribute('data-test-unread-count'); |
6 | Franz.setBadge(count); | 4 | Franz.setBadge(count); |
7 | }; | 5 | }; |
8 | 6 | ||