I am trying to write a JavaScript script that overlays on top of a Facebook page. It uses DOMContentLoaded to determine the loading of content, and then adds some additional material. However, since Facebook does not reload the page when it jumps to a new page (it simply uses AJAX), the DOMContentLoaded handler does not start again, although there are new things that can be viewed.
In any case, in order to detect the changes, I thought about using onhashchange, since Facebook used to change the hash page, but in Firefox 4 (I need to support Firefox 3 and later, but no other browsers), Facebook does not change the hash anymore and in pre-Firefox 3.6 there is no onhashchange.
I was thinking about using DOMNodeInserted, but would this really slow down the page? (I really can't slow this script down.)
jakey source share