Before a document is published outside of a content management system, it is good policy to ensure that all track changes data has been handled - either accepting or rejecting the changes. While it's easy for users to select "Accept All" before publishing, it is often useful to include a check before publishing to ensure that changes haven't slipped through.
Detecting the presence of change information is simple, any document with track changes data includes a "trackchanges" element in a hidden div at the end of the body. In nearly all cases you can just check if the string "<trackchanges " is present in the document. In rare cases where there is a custom tag called "trackchanges" in the document, you may need to additionally check for the presence of the DIV before the trackchanges element.
var hasChangeData = documentContent.indexOf("<trackchanges ") >= 0;