Created
September 30, 2014 15:45
-
-
Save carlbarrdahl/4cb1c2374314d2aec1d0 to your computer and use it in GitHub Desktop.
Ello Omnibar bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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