Google Chrome Tabs pinned

Hello,

I'm trying to figure out how to open a series of URL's in Chrome, and then pin them. I like to have my Chrome open and have 4-5 tabs open all the time but pinned so they don't take up too much room.

Unfortunately it looks like Chrome does not have a keyboard shortcut to pin a tab, and if possible I would like to avoid the macros that record mouse clicks, and I would like to avoid adding any chrome extensions that add a keyboard shortcut to pin a tab.

Looking at Chrome's developer documentation, it does appear that there is a way to do this with the API. Here's an example I found on stackoverflow -

chrome.tabs.create({
    "url": chrome.extension.getURL("skwares.html"),
    "pinned": true
},
function(tab) {
     tab.highlighted = true;
     tab.active = true;
 });

I don't know if it's possible to use this somehow, but any help on this would be great! Thanks!

My impression is that the Chrome plugins API uses its own sandboxed evaluation space, beyond the reach of webpage JS and the KM execute JS in browser actions.

That's probably correct. I was afraid that might be the case.

Thank you!

I doubt it, since "pinned" is NOT exposed as a property of tab:

From the Chrome scripting dictionary:
image

1 Like

Hey Robby,

That's not overly difficult.

You can use Keyboard Maestro to create a keyboard shortcut for pinning a tab, or you can use the keyboard system preferences.

Automation can be accomplished using only stock Keyboard Maestro actions.

-Chris


Google Chrome -- Make Pinned Tabs.kmmacros (6.4 KB)

1 Like

That worked like a champ! Thank you for your help!