I have a small script that customises certain list views, hiding buttons.
This is done using jQuery $(document).ready()
Because this js is manipulating standard pages it is stored in the left sidebar.
However, I can see that the call to the function is being made when the document is not really ready. I'm guessing that salesforce is fetching list contents (including buttons) dynamically.
So my attempts to show or hide something are in vain because that thing has not yet been inserted into the page.
How can I make sure that this script get executed when salesforce is done rendering the list completely?