diff options
Diffstat (limited to 'recipes/weekplan/webview.js')
-rw-r--r-- | recipes/weekplan/webview.js | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/recipes/weekplan/webview.js b/recipes/weekplan/webview.js index 5085199..c657366 100644 --- a/recipes/weekplan/webview.js +++ b/recipes/weekplan/webview.js | |||
@@ -1,10 +1,28 @@ | |||
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 | const events = document.querySelectorAll(".today")[0].querySelectorAll('.list')[0].querySelectorAll('.task-list')[0].querySelectorAll('.event-section')[0].querySelectorAll('.droppable')[0].children[0].childElementCount | 9 | const events = document |
4 | const tasks = document.querySelectorAll(".today")[0].querySelectorAll('.list')[0].querySelectorAll('.task-list')[0].querySelectorAll('.task-section')[0].querySelectorAll('.droppable')[0].children[0].childElementCount | 10 | .querySelectorAll('.today')[0] |
11 | .querySelectorAll('.list')[0] | ||
12 | .querySelectorAll('.task-list')[0] | ||
13 | .querySelectorAll('.event-section')[0] | ||
14 | .querySelectorAll('.droppable')[0].children[0].childElementCount; | ||
15 | const tasks = document | ||
16 | .querySelectorAll('.today')[0] | ||
17 | .querySelectorAll('.list')[0] | ||
18 | .querySelectorAll('.task-list')[0] | ||
19 | .querySelectorAll('.task-section')[0] | ||
20 | .querySelectorAll('.droppable')[0].children[0].childElementCount; | ||
5 | 21 | ||
6 | Ferdium.setBadge(events + tasks); | 22 | Ferdium.setBadge(events + tasks); |
7 | }; | 23 | }; |
8 | 24 | ||
9 | Ferdium.loop(getMessages); | 25 | Ferdium.loop(getMessages); |
10 | } | 26 | |
27 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
28 | }; | ||