From 41f54f8ffdc7bae7457b6f7b6ec8bdf0b67f3a4b Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Wed, 30 Aug 2023 14:20:38 +0200 Subject: 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. --- recipes/todoist/package.json | 2 +- recipes/todoist/webview.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'recipes/todoist') 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 @@ { "id": "todoist", "name": "Todoist", - "version": "1.5.0", + "version": "1.5.1", "license": "MIT", "repository": "https://github.com/meetfranz/recipe-todoist", "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 => { function getTasks() { let todayCount = 0; let inboxCount = 0; - const todayElement = document.querySelector('#filter_today .item_counter'); - const inboxElement = document.querySelector('#filter_inbox .item_counter'); + const todayElement = document.querySelector( + '#filter_today div div a + span div span', + ); + const inboxElement = document.querySelector( + '#filter_inbox div div a + span div span', + ); if (todayElement) { todayCount = Ferdium.safeParseInt(todayElement.textContent); -- cgit v1.2.3-54-g00ecf