Don't run translator tester without Zotero Standalone
This commit is contained in:
		
					parent
					
						
							
								ca1e3f8647
							
						
					
				
			
			
				commit
				
					
						cd046433da
					
				
			
		
					 1 changed files with 17 additions and 2 deletions
				
			
		|  | @ -205,10 +205,25 @@ TranslatorTestView.prototype.runTests = function(doneCallback) { | ||||||
|  */ |  */ | ||||||
| function load(event) {	 | function load(event) {	 | ||||||
| 	if(window.chrome || window.safari) { | 	if(window.chrome || window.safari) { | ||||||
| 		// initialize
 | 		// initialize injection
 | ||||||
| 		Zotero.initInject(); | 		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
 | 	// create translator box
 | ||||||
| 	translatorBox = document.createElement("div"); | 	translatorBox = document.createElement("div"); | ||||||
| 	translatorBox.id = "translator-box"; | 	translatorBox.id = "translator-box"; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Kornblith
				Simon Kornblith