Bluesky: keys 1-9 switch between pinned feeds
Lets you jump between feed tabs at the top by pressing 1-9 according to their position.
Code to copy
// Number keys 1-9 jump between pinned feed tabs at the top
(function () {
function tabs() {
var bar = document.querySelector(
'[data-testid="homeScreenFeedTabs"], [data-testid="feedsTabBar"], [role="tablist"]'
);
if (!bar) { return []; }
return Array.from(bar.querySelectorAll('[role="tab"], a[role="link"]'));
}
document.addEventListener('keydown', function (e) {
var t = e.target;
if (t && (t.isContentEditable || /^(INPUT|TEXTAREA)$/.test(t.tagName))) { return; }
if (e.ctrlKey || e.metaKey || e.altKey) { return; }
if (e.key < '1' || e.key > '9') { return; }
var list = tabs();
var idx = parseInt(e.key, 10) - 1;
if (list[idx]) {
list[idx].click();
e.preventDefault();
}
});
})();
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.