diff options
Diffstat (limited to 'recipes/rainloop')
-rw-r--r-- | recipes/rainloop/package.json | 2 | ||||
-rw-r--r-- | recipes/rainloop/webview.js | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/recipes/rainloop/package.json b/recipes/rainloop/package.json index 3c9ce18..3d3b2c4 100644 --- a/recipes/rainloop/package.json +++ b/recipes/rainloop/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "rainloop", | 2 | "id": "rainloop", |
3 | "name": "RainLoop", | 3 | "name": "RainLoop", |
4 | "version": "1.2.0", | 4 | "version": "1.3.0", |
5 | "repository": "https://github.com/promarcel/franz-recipe-rainloop", | 5 | "repository": "https://github.com/promarcel/franz-recipe-rainloop", |
6 | "license": "MIT", | 6 | "license": "MIT", |
7 | "config": { | 7 | "config": { |
diff --git a/recipes/rainloop/webview.js b/recipes/rainloop/webview.js index 6b0c3d6..0421d54 100644 --- a/recipes/rainloop/webview.js +++ b/recipes/rainloop/webview.js | |||
@@ -1,13 +1,21 @@ | |||
1 | function _interopRequireDefault(obj) { | ||
2 | return obj && obj.__esModule ? obj : { default: obj }; | ||
3 | } | ||
4 | |||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
1 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
2 | const getMessages = () => { | 8 | const getMessages = () => { |
3 | let messages = 0; | 9 | let messages = 0; |
4 | 10 | ||
5 | // Let's only loop through user folders, as all system folders are duplicated there | 11 | // Let's only loop through user folders, as all system folders are duplicated there |
6 | for (const obj of document.querySelectorAll('.b-folders-user .ui-droppable')) { | 12 | for (const obj of document.querySelectorAll( |
13 | '.b-folders-user .ui-droppable', | ||
14 | )) { | ||
7 | const countEl = obj.querySelector('.count'); | 15 | const countEl = obj.querySelector('.count'); |
8 | const countText = countEl ? countEl.innerHTML : ''; | 16 | const countText = countEl ? countEl.innerHTML : ''; |
9 | 17 | ||
10 | if (countText != '') { | 18 | if (countText !== '') { |
11 | if (obj.classList.contains('system')) { | 19 | if (obj.classList.contains('system')) { |
12 | // Only count the Inbox system folder and ignore Archive, Trash, Drafts, Spam, Sent | 20 | // Only count the Inbox system folder and ignore Archive, Trash, Drafts, Spam, Sent |
13 | if (obj.classList.contains('i-am-inbox')) { | 21 | if (obj.classList.contains('i-am-inbox')) { |
@@ -23,4 +31,6 @@ module.exports = Ferdium => { | |||
23 | }; | 31 | }; |
24 | 32 | ||
25 | Ferdium.loop(getMessages); | 33 | Ferdium.loop(getMessages); |
34 | |||
35 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
26 | }; | 36 | }; |