diff options
author | Max Rydahl Andersen <max.andersen@gmail.com> | 2023-08-30 14:20:38 +0200 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2023-09-03 01:27:31 +0000 |
commit | 41f54f8ffdc7bae7457b6f7b6ec8bdf0b67f3a4b (patch) | |
tree | df3b09cbc8be66e6d770994c39c6c82050323388 /recipes/todoist/webview.js | |
parent | Fix issue with login with google (diff) | |
download | ferdium-recipes-41f54f8ffdc7bae7457b6f7b6ec8bdf0b67f3a4b.tar.gz ferdium-recipes-41f54f8ffdc7bae7457b6f7b6ec8bdf0b67f3a4b.tar.zst ferdium-recipes-41f54f8ffdc7bae7457b6f7b6ec8bdf0b67f3a4b.zip |
fix counters in todoist
Why:
* no counters shown for todoist integration; caused
by todoist moving to use generated class names.
This change addreses the need by:
* use absolute element selectors instead of class names
not as nice, but works as of now.
Diffstat (limited to 'recipes/todoist/webview.js')
-rw-r--r-- | recipes/todoist/webview.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/recipes/todoist/webview.js b/recipes/todoist/webview.js index 32dc1f2..0dc53a9 100644 --- a/recipes/todoist/webview.js +++ b/recipes/todoist/webview.js | |||
@@ -8,8 +8,12 @@ module.exports = Ferdium => { | |||
8 | function getTasks() { | 8 | function getTasks() { |
9 | let todayCount = 0; | 9 | let todayCount = 0; |
10 | let inboxCount = 0; | 10 | let inboxCount = 0; |
11 | const todayElement = document.querySelector('#filter_today .item_counter'); | 11 | const todayElement = document.querySelector( |
12 | const inboxElement = document.querySelector('#filter_inbox .item_counter'); | 12 | '#filter_today div div a + span div span', |
13 | ); | ||
14 | const inboxElement = document.querySelector( | ||
15 | '#filter_inbox div div a + span div span', | ||
16 | ); | ||
13 | 17 | ||
14 | if (todayElement) { | 18 | if (todayElement) { |
15 | todayCount = Ferdium.safeParseInt(todayElement.textContent); | 19 | todayCount = Ferdium.safeParseInt(todayElement.textContent); |