mirror of
				https://codeberg.org/ashley/poke
				synced 2025-07-17 16:52:11 +00:00 
			
		
		
		
	add a check lol
This commit is contained in:
		
							parent
							
								
									f246877464
								
							
						
					
					
						commit
						d37ded7449
					
				| @ -73,25 +73,27 @@ function init(app, config, rendertemplate) { | ||||
| 
 | ||||
|       initlog("Loaded pages - initing poketube finnished :3"); | ||||
|       setTimeout(function () { | ||||
|         /* PokeTube Update daemon - checks for updates in poketube */ | ||||
|         (async () => { | ||||
|           const url = `https://poketube.fun/api/version.json`; | ||||
|         setInterval(function () { | ||||
|           /* PokeTube Update daemon - checks for updates in poketube */ | ||||
|           (async () => { | ||||
|             const url = `https://poketube.fun/api/version.json`; | ||||
| 
 | ||||
|           let f = await modules | ||||
|             .fetch(url) | ||||
|             .then((res) => res.text()) | ||||
|             .then((json) => JSON.parse(json)); | ||||
|             let f = await modules | ||||
|               .fetch(url) | ||||
|               .then((res) => res.text()) | ||||
|               .then((json) => JSON.parse(json)); | ||||
| 
 | ||||
|           if (f.vernum == api) { | ||||
|             console.log("[UPDATE DAEMON] PokeTube is up to date!"); | ||||
|           } | ||||
|             if (f.vernum == api) { | ||||
|               console.log("[UPDATE DAEMON] PokeTube is up to date!"); | ||||
|             } | ||||
| 
 | ||||
|           if (f.vernum != api) { | ||||
|             console.warn( | ||||
|               "[UPDATE DAEMON] PokeTube is out of date! please re-clone the poketube repo :p  " | ||||
|             ); | ||||
|           } | ||||
|         })(); | ||||
|             if (f.vernum != api) { | ||||
|               console.warn( | ||||
|                 "[UPDATE DAEMON] PokeTube is out of date! please re-clone the poketube repo :p  " | ||||
|               ); | ||||
|             } | ||||
|           })(); | ||||
|         }, 150000); | ||||
|       }, 150000); | ||||
|     } catch (err) { | ||||
|       initlog("[FAILED] Load pages \n" + err); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ashley
						Ashley