diff options
Diffstat (limited to 'recipes/yahoo-mail/webview.js')
-rw-r--r-- | recipes/yahoo-mail/webview.js | 14 |
1 files changed, 12 insertions, 2 deletions
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 | }; |