mirror of
				https://github.com/EndPwnArchive/endpwn3.git
				synced 2024-08-15 00:23:30 +00:00 
			
		
		
		
	Merge pull request #2 from ashkitten/patch-1
"untested" what's the worst that could happen?
This commit is contained in:
		
						commit
						4d7f3fe837
					
				
					 1 changed files with 11 additions and 5 deletions
				
			
		
							
								
								
									
										16
									
								
								shared.js
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								shared.js
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -23,10 +23,16 @@
 | 
			
		|||
        users: {}
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    // fetch goodies.json
 | 
			
		||||
    fetch('https://endpwn.cathoderay.tube/goodies.json?_=' + Date.now())
 | 
			
		||||
        .then(x => x.json())
 | 
			
		||||
        .then(r => __goodies = r);
 | 
			
		||||
    function fetchGoodies() {
 | 
			
		||||
        // fetch goodies.json
 | 
			
		||||
        fetch('https://endpwn.cathoderay.tube/goodies.json?_=' + Date.now())
 | 
			
		||||
            .then(x => x.json())
 | 
			
		||||
            .then(r => __goodies = r);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    // Fetch goodies now and every half hour
 | 
			
		||||
    fetchGoodies();
 | 
			
		||||
    setInterval(fetchGoodies, 1800000);
 | 
			
		||||
 | 
			
		||||
    // early init payload
 | 
			
		||||
    document.addEventListener('ep-prepared', () => {
 | 
			
		||||
| 
						 | 
				
			
			@ -107,4 +113,4 @@
 | 
			
		|||
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
})();
 | 
			
		||||
})();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue