diff options
Diffstat (limited to 'recipes/yahoo-mail')
-rw-r--r-- | recipes/yahoo-mail/index.js | 30 | ||||
-rw-r--r-- | recipes/yahoo-mail/package.json | 2 | ||||
-rw-r--r-- | recipes/yahoo-mail/webview.js | 14 |
3 files changed, 29 insertions, 17 deletions
diff --git a/recipes/yahoo-mail/index.js b/recipes/yahoo-mail/index.js index 858fff1..8e2576a 100644 --- a/recipes/yahoo-mail/index.js +++ b/recipes/yahoo-mail/index.js | |||
@@ -1,15 +1,17 @@ | |||
1 | module.exports = (Ferdium) => class YahooMail extends Ferdium { | 1 | module.exports = Ferdium => |
2 | modifyRequestHeaders() { | 2 | class YahooMail extends Ferdium { |
3 | return [ | 3 | modifyRequestHeaders() { |
4 | { | 4 | return [ |
5 | headers: { | 5 | { |
6 | // TODO: Rather than hardcoding like this, the user should set it for their individual installation of Ferdium | 6 | headers: { |
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 | // TODO: Rather than hardcoding like this, the user should set it for their individual installation of Ferdium |
8 | 'user-agent': | ||
9 | 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36', | ||
10 | }, | ||
11 | requestFilters: { | ||
12 | urls: ['*://*/*'], | ||
13 | }, | ||
8 | }, | 14 | }, |
9 | requestFilters: { | 15 | ]; |
10 | urls: ['*://*/*'], | 16 | } |
11 | }, | 17 | }; |
12 | }, | ||
13 | ]; | ||
14 | } | ||
15 | }; | ||
diff --git a/recipes/yahoo-mail/package.json b/recipes/yahoo-mail/package.json index a90df33..609e48a 100644 --- a/recipes/yahoo-mail/package.json +++ b/recipes/yahoo-mail/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "yahoo-mail", | 2 | "id": "yahoo-mail", |
3 | "name": "Yahoo Mail", | 3 | "name": "Yahoo Mail", |
4 | "version": "1.2.2", | 4 | "version": "1.3.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://mail.yahoo.com", | 7 | "serviceURL": "https://mail.yahoo.com", |
diff --git a/recipes/yahoo-mail/webview.js b/recipes/yahoo-mail/webview.js index 9ab9b6b..fc74834 100644 --- a/recipes/yahoo-mail/webview.js +++ b/recipes/yahoo-mail/webview.js | |||
@@ -1,8 +1,18 @@ | |||
1 | module.exports = (Ferdium) => { | 1 | function _interopRequireDefault(obj) { |
2 | return obj && obj.__esModule ? obj : { default: obj }; | ||
3 | } | ||
4 | |||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
7 | module.exports = Ferdium => { | ||
2 | const getMessages = () => { | 8 | const getMessages = () => { |
3 | const count = document.querySelector('a[data-test-folder-name="Inbox"] span[data-test-id="displayed-count"]').textContent; | 9 | const count = document.querySelector( |
10 | 'a[data-test-folder-name="Inbox"] span[data-test-id="displayed-count"]', | ||
11 | ).textContent; | ||
4 | Ferdium.setBadge(count); | 12 | Ferdium.setBadge(count); |
5 | }; | 13 | }; |
6 | 14 | ||
7 | Ferdium.loop(getMessages); | 15 | Ferdium.loop(getMessages); |
16 | |||
17 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
8 | }; | 18 | }; |