Sign in
chromium
/
chromium
/
extensions-by-google
/
2bf8771f46b7696475853f16f068f940174f6aee
/
.
/
go-back-with-backspace
/
content_script.js
blob: cf3a2991ed644ed2418b24028d3b15d046c37470 [
file
] [
log
] [
blame
]
// Listen for the backspace key and go back if not in an editable field.
document
.
addEventListener
(
'keydown'
,
function
(
e
)
{
if
(
e
.
which
===
8
&&
// backspace key code
!
isEditable
(
e
.
path
))
{
window
.
history
.
back
();
e
.
preventDefault
();
}
});