How can I create bookmark shortcuts that run SPECIFIC scripts that I created?

How can I create bookmark shortcuts that run SPECIFIC scripts that I created?

Meaning that I want some kind of shortcuts for scrips that I run again and again

:slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile:

+1 @hb7of9

The only ways (that I know of) to open a bookmark with the keyboard are the following:

Using the Bookmark Manager:

Open Bookmark Manager by pressing Ctrl + Shift + O.

Three options:

Search all bookmarks (just start typing), press Tab twice and select the desired bookmark with the arrow keys.

Press Tab, select the desired folder, press Tab again and select the desired bookmark with the arrow keys.

If the desired bookmark is in the Bookmarks Bar, press Tab twice and select the desired bookmark with the arrow keys.

Press Enter.

Using Customize and control Google Chrome:

Press Alt + E or Alt + F to open Customize and control Google Chrome.

Press B to enter Bookmarks.

Assuming the desired bookmark is in the Bookmarks Bar, select it with the arrow keys.

Press Enter.

Using the Omnibox:

Press Ctrl + L, Alt + D or F6 to focus the Omnibox.

Type (part of) the desired bookmark’s name.

When it appears in the drop-down below the Omnibox, select the desired bookmark with the arrow keys.

Press Enter.

With extensions
Several extensions are able to do this. The easiest way is probably a user script like this one:

// ===UserScript===
// @name Bookmark Launcher
// @description Launches bookmarks with keyboard shortcuts
// ===/UserScript===

var bookmarkLauncherSetup = (function() {
var bookmarks = {}, url;

bookmarks['G'] = 'http://google.com';
bookmarks['S'] = 'http://superuser.com';

window.addEventListener('keyup', function() {
    if(event.ctrlKey && event.altKey && !event.shiftKey)
        if(url = bookmarks[String.fromCharCode(event.keyCode)])
            window.open(url);
});

}());
To use it, do the following:

Modify the array bookmarks to suit your needs. All letter and number keys should work fine.

Save the code as bookmark-launcher.user.js in a location of your choice.

Open chrome://extensions/ in Google Chrome.

Drag and drop bookmark-launcher.user.js in the open tab.

Click Add.

Note that no extension can function in tabs opening chrome://… URLs (this includes New Tab) or the Chrome Web Store.

In any other tab (after reloading it), pressing Ctrl + Alt + S will open Super User in a new tab.

Note that you have to be focusing the tab itself. If you’re focusing, e.g., the omnibox or the developer console, the keyboard shortcuts won’t have any effect.