Skip to content

Instantly share code, notes, and snippets.

@DrewAPicture
Last active November 18, 2017 21:49
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 DrewAPicture/fe13d4ae54ae6beff6bb7e88a3c2e965 to your computer and use it in GitHub Desktop.
Save DrewAPicture/fe13d4ae54ae6beff6bb7e88a3c2e965 to your computer and use it in GitHub Desktop.
var bookmarkLauncherSetup = (function() {
var bookmarks = {}, url;
bookmarks['r'] = 'https://www.reddit.com/r/popular';
bookmarks['f'] = 'https://facebook.com';
bookmarks['a'] = 'https://smile.amazon.com';
bookmarks['h'] = 'https://secure.helpscout.net/members/login/';
bookmarks['i'] = 'http://www.imdb.com/';
bookmarks['m'] = 'http://mutrunk.dev/wp-admin';
bookmarks['t'] = 'http://twitter.com/home';
bookmarks['y'] = 'http://youtube.com';
window.addEventListener('keyup', function() {
if( 234 == event.keyCode && event.shiftKey ) {
if( url == bookmarks[String.fromCharCode(event.keyCode)] ) {
window.open(url);
}
}
});
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment