Bypass Trello cards lazy loading

Hello there,

I’m developing a Chrome Extension for Trello (for a very specific use of one of my clients). It is finished but I’m facing an issue: My extension is basically reading informations from the cards of the Trello board, and treating them. But my issue is that all cards that are out of the viewport don’t have any data.

As a developer, I obviously understand the logic behind this (lazy loading ftw). But I would like to know if there is a way to bypass this, and force the load of every card’s data? Like a query param, perhaps? I really need to have the data of all cards contained in all columns for my extension to be useful (the data range is fixed, roughly 15 cards per column, for about 10 columns).

I started to simulate the scroll at the load of the page via DOM events but it’s not really reliable to do that many actions in such short timespan. So before diving more into this, I wanted to give it a try here :sweat_smile:

Thanks a lot for your help! Cheers

Hello @JohnDev
This topic comes up from time to time. Yep, one of the drawbacks of browser side plug-ins is their dependency on what shown in the viewport, which Trello constantly changes rather than triggering server side calls and re-rendering the page. When the page is first rendered, you’ve got a small window of opportunity to parse the DOM / viewport and get what you need before the user or something else changes it. You might also be competing against another browser plug-in that is changing the viewport too, to do things like hide columns, hide certain cards, alter what’s shown for each card etc.
If you really must be able to reliably get all the data of all the cards on the board, whether or not they are currently rendered on the page or not, you’re going to need to query Trello’s REST API… and all that entails.