+ Add Question

Javascript objects available in your main webpage?

OH

Hi,

I'm trying to develop a Fogger application for Todoist (Fogger allows to turn web services into almost Desktop apps on Ubuntu). I would like to display the overdue+today task count as a number (like in the chrome application).
Fogger allows me to create a script that is injected into the website directly. My question is - what will be the easiest way to check if Todoist is already loaded (or wait for it to load and catch an event), and then to obtain the overdue+today count.

I know I can use the API but I thought it might be more elegant to use a Javascript object already defined by Todoist on the main webpage.


Thanks!
Omri

All responses

Amir Salihefendic staff
Replied on Aug 13, 2012 - 11:41 UTC

Hi Omri

You can use https://todoist.com/Agenda/getCount

Regards,
Amir