Skip to content

Instantly share code, notes, and snippets.

@carlbarrdahl
Created September 30, 2014 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlbarrdahl/4cb1c2374314d2aec1d0 to your computer and use it in GitHub Desktop.
Save carlbarrdahl/4cb1c2374314d2aec1d0 to your computer and use it in GitHub Desktop.
Ello Omnibar bookmarklet
// Focuses the Omnibar on Shift+2
javascript: (function () {
window.addEventListener('keydown', function (e) {
if (e.shiftKey && e.keyCode === 50) {
var omni = document.querySelector('.omnibar .editable');
// Timeout to prevent shortcut (") to leak into textfield
setTimeout(function () {
omni.click();
});
}
});
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment