I'm trying to add some jQuery stuff to Gmail using a GreaseMonkey script. Adding jQuery functionality works fine, but the problem is that I can't really detect when Gmail has finished loading.
This is basically what happens:
- I refresh Gmail
- The loading window starts
- The GM script starts 3 times, during the loading window
- Something in the loading window changes
- The GM script starts one more time
- The page changes
- The GM script starts for the last time
- Gmail view loads and finishes
At this point a bunch of JavaScript has been loaded into the DOM that probably calls on some functions that use AJAX to load the rest of the view.
I'd like for jQuery to do stuff after step 8, when everything has finished loading.
Does anyone know how to do/detect this?