fixes bug 896562 - API documentation javascript is too impatient

See [bug](https://bugzilla.mozilla.org/show_bug.cgi?id=896562#c0) for a description.

@rhelmer @AdrianGaudebert r?