Skip to content

Instantly share code, notes, and snippets.

@MatthewRDodds
Last active February 26, 2024 07:23
Show Gist options
  • Save MatthewRDodds/4688a83a9c09378862d5af9814d6f7b3 to your computer and use it in GitHub Desktop.
Save MatthewRDodds/4688a83a9c09378862d5af9814d6f7b3 to your computer and use it in GitHub Desktop.
Bookmark Launch Script
// ==UserScript==
// @name Bookmark Launcher
// @description Launches bookmakrs with keyboard shortcuts
// ==/UserScript==
// https://superuser.com/questions/496212/shortcut-to-open-specific-bookmark-url-in-chrome
// chrome://chrome/extensions/
var bookmarkLauncherSetup = (function() {
var bookmarks = {}, url;
bookmarks['E'] = 'https://console.aws.amazon.com/elasticbeanstalk/home?region=us-east-1#/applications';
bookmarks['G'] = 'http://lab.gracehill.com/Vision/RubyVision/';
bookmarks['M'] = 'https://mail.google.com/mail/u/0/#inbox';
bookmarks['J'] = 'http://master.newvisionlms.com/';
window.addEventListener('keyup', function() {
if(event.ctrlKey && event.altKey && !event.shiftKey) {
if(event.keyCode == "H") {
alert(JSON.stringify(bookmarks))
} else 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