mirror of
				https://github.com/imezx/Warp.git
				synced 2025-11-03 19:49:16 +00:00 
			
		
		
		
	
		
			
	
	
		
			10 lines
		
	
	
	
		
			258 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			10 lines
		
	
	
	
		
			258 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 
								 | 
							
								import { inBrowser } from '../../shared';
							 | 
						||
| 
								 | 
							
								import { ref } from 'vue';
							 | 
						||
| 
								 | 
							
								const hashRef = ref(inBrowser ? location.hash : '');
							 | 
						||
| 
								 | 
							
								if (inBrowser) {
							 | 
						||
| 
								 | 
							
								    window.addEventListener('hashchange', () => {
							 | 
						||
| 
								 | 
							
								        hashRef.value = location.hash;
							 | 
						||
| 
								 | 
							
								    });
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								export { hashRef };
							 |