Skip to content

Commit

Permalink
cmd+f should also focus on search input
Browse files Browse the repository at this point in the history
  • Loading branch information
bcalik committed Apr 6, 2016
1 parent 87e3f0d commit 0a2c2c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/js/injected.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
console.log("Adding event listeners");

document.addEventListener("keydown", function (event) {
if (event.keyCode === 75 && event.metaKey === true) inputSearch.focus()
// cmd+k and cmd+f focuses on search input.
if ((event.keyCode === 75 || event.keyCode == 70) && event.metaKey === true)
inputSearch.focus();
});

console.log("Disconnecting the observer");
Expand Down

0 comments on commit 0a2c2c4

Please sign in to comment.