I recently built [a userscript for Board Games Stack Exchange](http://meta.boardgames.stackexchange.com/questions/1245/board-games-se-mana-symbols-a-userscript-for-auto-conversion-of-mana-symbols-to). On page load, it scans questions and answers for certain plaintext patterns and replaces them with some HTML, making the posts prettier. It only works on page load, however. If someone hits edit and edits the post in place (where they get to do the edit and save process in an AJAXy way without leaving the page), then when they save their edit, their freshly-edited post will be reloaded and _won't_ be prettified by the userscript. Or if pictures make it clearer: 1. Have post that was prettified on page load. > ![pictures!][1] 2. Do some editing. > ![edit panel open][2] 3. Save, post gets saved all AJAX-style and reloaded, and is no longer prettified. > ![oh no!][3] How can I have my userscript reliably detect that a post's finished being edited, and do stuff to the freshly reloaded post only once there's something to do stuff to? (It occurs to me there are other scenarios, such as _someone else_ edits the post whilst you're reading it, and that bar appears at the top offering to reload the answer. If there's some solution that helps in these situations in general, that would be excellent.) [1]: https://i.sstatic.net/VRtqr.png [2]: https://i.sstatic.net/t6CUq.png [3]: https://i.sstatic.net/E3Axg.png