Basically what I want to do is to be able to detect when the particular page loads in some data dynamically.
This needs to be general as the script will run across a lot of websites whose js content or other content/configuration I am unaware of. My intention is that everytime something new is loaded onto the page it is picked up within my code so I can execute some other code as a result.
For instance, in an ideal world the following code/similar would exist;
$('body').ajaxRequestMade(function({
alert('my code here gets executed!');
});
I have not been able to find something like it and need it badly. One particular solution was to simply execute the code every 10 seconds or so (in hope new data may have been loaded in) but this is highly inefficient as it hogs the resources of the browser for about one second or so when my code analyses the page each time. It would be ideal if the analysis was only done at an appropriate point (when new data is loaded in).
Any ideas guys.