You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			27 lines
		
	
	
		
			611 B
		
	
	
	
		
			JavaScript
		
	
			
		
		
	
	
			27 lines
		
	
	
		
			611 B
		
	
	
	
		
			JavaScript
		
	
| /* global $: false */
 | |
| 
 | |
| // Add version and commit hash
 | |
| $('.version').text(`v${window.getVersion()}`);
 | |
| $('.commitHash').text(window.getCommitHash());
 | |
| 
 | |
| // Add debugging metadata - environment if not production, app instance name
 | |
| const states = [];
 | |
| 
 | |
| if (window.getEnvironment() !== 'production') {
 | |
|   states.push(window.getEnvironment());
 | |
| }
 | |
| if (window.getAppInstance()) {
 | |
|   states.push(window.getAppInstance());
 | |
| }
 | |
| 
 | |
| $('.environment').text(states.join(' - '));
 | |
| 
 | |
| // Install the 'dismiss with escape key' handler
 | |
| $(document).on('keyup', e => {
 | |
|   'use strict';
 | |
| 
 | |
|   if (e.keyCode === 27) {
 | |
|     window.closeAbout();
 | |
|   }
 | |
| });
 |