Reduce preload timeout
This commit is contained in:
		
							parent
							
								
									eedee762b7
								
							
						
					
					
						commit
						0fa7a4e687
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -280,15 +280,15 @@
 | 
			
		|||
                    return response.json();
 | 
			
		||||
                })
 | 
			
		||||
                .then(function(jsonResponse) {
 | 
			
		||||
                    jsonResponse.forEach((f) => {
 | 
			
		||||
                        const url = mapping[f.toLowerCase().replace(new RegExp("\\.[^/.]+$"), "")];
 | 
			
		||||
                        if (!url) return;
 | 
			
		||||
                    setTimeout(() => {
 | 
			
		||||
                        jsonResponse.forEach((f) => {
 | 
			
		||||
                            const url = mapping[f.toLowerCase().replace(new RegExp("\\.[^/.]+$"), "")];
 | 
			
		||||
                            if (!url) return;
 | 
			
		||||
 | 
			
		||||
                        // Preload the asset
 | 
			
		||||
                        setTimeout(() => {
 | 
			
		||||
                            fetch('gameasync/' + url).then().catch();
 | 
			
		||||
                        }, 1000);
 | 
			
		||||
                    });
 | 
			
		||||
                            // Preload the asset
 | 
			
		||||
                                fetch('gameasync/' + url).then().catch();
 | 
			
		||||
                        });
 | 
			
		||||
                    }, 200);
 | 
			
		||||
                });
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue