Added warning before leaving the page
This commit is contained in:
		
							parent
							
								
									0833727d96
								
							
						
					
					
						commit
						0ba03cdece
					
				
							
								
								
									
										9
									
								
								js/prototype/main.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								js/prototype/main.js
									
									
									
									
										vendored
									
									
								
							| @ -42,6 +42,15 @@ var loader; | ||||
| var coins = []; | ||||
| var previousTime; | ||||
| 
 | ||||
| window.onbeforeunload = function() { | ||||
| 
 | ||||
|     if (initMainScene !== initPeach && initMainScene !== initSponza && Coin.total !== 9) { | ||||
| 
 | ||||
|         return 'Warning : you are going to leave the page and abort the current test !'; | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| init(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user