aboutsummaryrefslogtreecommitdiffstats
path: root/recipes
diff options
context:
space:
mode:
authorLibravatar Max Rydahl Andersen <max.andersen@gmail.com>2023-08-30 14:20:38 +0200
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2023-09-03 01:27:31 +0000
commit41f54f8ffdc7bae7457b6f7b6ec8bdf0b67f3a4b (patch)
treedf3b09cbc8be66e6d770994c39c6c82050323388 /recipes
parentFix issue with login with google (diff)
downloadferdium-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')
-rw-r--r--recipes/todoist/package.json2
-rw-r--r--recipes/todoist/webview.js8
2 files changed, 7 insertions, 3 deletions
diff --git a/recipes/todoist/package.json b/recipes/todoist/package.json
index 1a06223..7272b6f 100644
--- a/recipes/todoist/package.json
+++ b/recipes/todoist/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "todoist", 2 "id": "todoist",
3 "name": "Todoist", 3 "name": "Todoist",
4 "version": "1.5.0", 4 "version": "1.5.1",
5 "license": "MIT", 5 "license": "MIT",
6 "repository": "https://github.com/meetfranz/recipe-todoist", 6 "repository": "https://github.com/meetfranz/recipe-todoist",
7 "config": { 7 "config": {
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);