www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit cd046433dab9411a9ab72140bb85c8b01578521c
parent ca1e3f8647d290b731552c842129323d81d8186e
Author: Simon Kornblith <simon@simonster.com>
Date:   Thu, 30 Jun 2011 23:10:00 +0000

Don't run translator tester without Zotero Standalone


Diffstat:
Mchrome/content/zotero/tools/testTranslators/testTranslators.js | 19+++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/tools/testTranslators/testTranslators.js b/chrome/content/zotero/tools/testTranslators/testTranslators.js @@ -205,10 +205,25 @@ TranslatorTestView.prototype.runTests = function(doneCallback) { */ function load(event) { if(window.chrome || window.safari) { - // initialize + // initialize injection Zotero.initInject(); + // make sure that connector is online + Zotero.Connector.checkIsOnline(function(status) { + if(status) { + init(); + } else { + document.body.textContent = "To avoid excessive repo requests, the translator tester may only be used when Zotero Standalone is running."; + } + }); + } else { + init(); } - +} + +/** + * Builds translator display and retrieves translators + */ +function init() { // create translator box translatorBox = document.createElement("div"); translatorBox.id = "translator-box";