Skip to content

Instantly share code, notes, and snippets.

@filiptepper
Created August 5, 2010 10:16
Show Gist options
  • Save filiptepper/509514 to your computer and use it in GitHub Desktop.
Save filiptepper/509514 to your computer and use it in GitHub Desktop.
var Chromac = (function(){
return {
handleBookmarksBar: function(e) {
if ((e.metaKey === true || e.ctrlKey === true) && e.shiftKey === true && (e.keyCode >= 49 && e.keyCode <= 57)) {
chrome.extension.sendRequest({ name: "bookmarksBar", id: (-48 + parseInt(e.keyCode)), new_tab: e.altKey });
e.preventDefault();
}
}
}
})();
window.addEventListener("keydown", Chromac.handleBookmarksBar, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment