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();
 | 
					                    return response.json();
 | 
				
			||||||
                })
 | 
					                })
 | 
				
			||||||
                .then(function(jsonResponse) {
 | 
					                .then(function(jsonResponse) {
 | 
				
			||||||
 | 
					                    setTimeout(() => {
 | 
				
			||||||
                        jsonResponse.forEach((f) => {
 | 
					                        jsonResponse.forEach((f) => {
 | 
				
			||||||
                            const url = mapping[f.toLowerCase().replace(new RegExp("\\.[^/.]+$"), "")];
 | 
					                            const url = mapping[f.toLowerCase().replace(new RegExp("\\.[^/.]+$"), "")];
 | 
				
			||||||
                            if (!url) return;
 | 
					                            if (!url) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            // Preload the asset
 | 
					                            // Preload the asset
 | 
				
			||||||
                        setTimeout(() => {
 | 
					 | 
				
			||||||
                                fetch('gameasync/' + url).then().catch();
 | 
					                                fetch('gameasync/' + url).then().catch();
 | 
				
			||||||
                        }, 1000);
 | 
					 | 
				
			||||||
                        });
 | 
					                        });
 | 
				
			||||||
 | 
					                    }, 200);
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue