mirror of
				https://codeberg.org/kbruen/kai.infotren.git
				synced 2025-11-04 08:56:37 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			436 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			436 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable file
		
	
	
	
	
window.addEventListener('load', function (e) {
 | 
						|
	document.body.addEventListener('keydown', function (e) {
 | 
						|
		if (e.key == 'Backspace' && (e.target.tagName.toUpperCase() !== 'INPUT' || e.target.value.length === 0)) {
 | 
						|
			e.preventDefault()
 | 
						|
			window.history.back()
 | 
						|
		}
 | 
						|
	})
 | 
						|
 | 
						|
	var backButton = document.getElementById('back-button')
 | 
						|
	if (backButton) {
 | 
						|
		backButton.addEventListener('click', function (e) {
 | 
						|
			window.history.back()
 | 
						|
		})
 | 
						|
	}
 | 
						|
})
 |