9 lines
277 B
9 lines
277 B
3 years ago
|
window.addEventListener('load', function (e) {
|
||
|
this.document.body.addEventListener('keydown', function (e) {
|
||
3 years ago
|
if (e.key == 'Backspace' && (e.target.tagName.toUpperCase() !== 'INPUT' || e.target.value.length === 0)) {
|
||
3 years ago
|
e.preventDefault()
|
||
|
window.history.back()
|
||
|
}
|
||
|
})
|
||
|
})
|