Translation through Standalone should wait for page to finish loading
188BET靠谱吗When a translator is incompatible with Chrome (or Safari), the page is sent to Standalone for translation (this is probably also broken on zotero.org server).Standalone loads the page and appears to immediately start translation.However, as we've seen previously with automatic translation testing, some pages load a precursor page with little to no content.Standalone translation should wait a bit before translating the page.
E.g.
188BET靠谱吗https://github.com/zotero/translators/pull/545
Currently breaks in Chrome on http://ntrs.nasa.gov/search.jsp?R=19910053222&hterms=jegley&qs=Ntx=mode%20matchallpartial%20&Ntk=All&N=4294937145&Ntt=jegley
(there's no reason for the translator to be incompatible with Chrome, but it illustrates the problem)
Adding some debug code, I see that the following page is being translated by Standalone
addthis.com looks like it might be a pretty popular service, so we are likely to run into this issue in the future.Even with compatible translators, this is probably an issue with the bookmarklet.
Introducing a general delay might be unnecessary (and depending on the delay would probably be quite annoying), so maybe we can add a translator property similar to "delay: true" for automatic testing.Or perhaps there is a way to detect when, say, no HTTP requests have been made (and none are active) from the page for a set amount of time before we begin translation.
E.g.
188BET靠谱吗https://github.com/zotero/translators/pull/545
Currently breaks in Chrome on http://ntrs.nasa.gov/search.jsp?R=19910053222&hterms=jegley&qs=Ntx=mode%20matchallpartial%20&Ntk=All&N=4294937145&Ntt=jegley
(there's no reason for the translator to be incompatible with Chrome, but it illustrates the problem)
Adding some debug code, I see that the following page is being translated by Standalone
[...omitted...]
http://ct1.addthis.com/static/r07/core065.js">;
addthis.com looks like it might be a pretty popular service, so we are likely to run into this issue in the future.Even with compatible translators, this is probably an issue with the bookmarklet.
Introducing a general delay might be unnecessary (and depending on the delay would probably be quite annoying), so maybe we can add a translator property similar to "delay: true" for automatic testing.Or perhaps there is a way to detect when, say, no HTTP requests have been made (and none are active) from the page for a set amount of time before we begin translation.