I have a GM script that adds buttons next to certain hyperlinks on Facebook pages. However, any AJAX update nukes the buttons in that section of page (i.e. when you click 'view more comments' - all the buttons on that thread vanish)
What I desire to do:
Re-run my GM function after certain AJAX operations complete - mainly when viewing more comments & loading a new page (I.e click to a different group page, this is all AJAXed)
what I currently do:
Have a 30 second loop that just re-runs my code every 30 seconds. not ideal. Setting a shorter loop will just cause lag
Edit - it actually makes more and more buttons. Super not ideal!
How you can help:
what code should I use to trigger my function after AJAX finishes loading something? What should I be doing so that my code only fires upon my desired AJAX updates, such as the 'new page' & 'more comments' updates?
Edit - I need to re-run my code only on the updated bit (is this even possible?)
Notes:
I have searched a bit and find a number answers for plain jQuery, asp.net, etc., but not the GM-jQ combo.