Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: go-back-with-backspace/content_script.js

Issue 2126003003: Go Back With Backspace extension (Closed) Base URL: https://chromium.googlesource.com/chromium/extensions-by-google.git@master
Patch Set: Fix quotation marks Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « go-back-with-backspace/_locales/en/messages.json ('k') | go-back-with-backspace/icon128.png » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Listen for the backspace key and go back if not in an editable field.
2 document.addEventListener('keydown', function(e) {
3 if (e.which === 8 && // backspace key code
4 !isEditable(e.path)) {
5 window.history.back();
6 e.preventDefault();
7 }
8 });
OLDNEW
« no previous file with comments | « go-back-with-backspace/_locales/en/messages.json ('k') | go-back-with-backspace/icon128.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698