You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
436 B
15 lines
436 B
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() |
|
}) |
|
} |
|
})
|
|
|