mirror of
				https://github.com/mickael-kerjean/filestash.git
				synced 2025-10-31 01:58:11 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			591 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			591 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import React from 'react';
 | |
| import ReactDOM from 'react-dom';
 | |
| import Router  from './router';
 | |
| 
 | |
| import './assets/css/reset.scss';
 | |
| 
 | |
| window.addEventListener("DOMContentLoaded", () => {
 | |
|     const className = 'ontouchstart' in window ? 'touch-yes' : 'touch-no';
 | |
|     document.body.classList.add(className);
 | |
| 
 | |
|     ReactDOM.render(<Router/>, document.getElementById('main'));
 | |
| 
 | |
|     if ('serviceWorker' in navigator) {
 | |
|         navigator.serviceWorker.register('/assets/worker/cache.js').catch(function(error) {
 | |
|             console.log('ServiceWorker registration failed:', error);
 | |
|         });
 | |
|     }
 | |
| });
 | 
