← All examples

JavaScript Navigation bsky.app

Bluesky: bookmarks shortcut in the sidebar

Adds a "Bookmarks" entry to the left navigation so saved posts are just one click away.

Code to copy

// Add a "Bookmarks" entry to the left navigation that opens the saved-posts page
(function () {
  function inject() {
    if (document.getElementById('jz-bsk-bookmarks-link')) { return; }
    var nav = document.querySelector('nav[role="navigation"], [data-testid="sideNav"], [data-testid="leftNav"]');
    if (!nav) { return; }
    var ref = nav.querySelector('a[href="/notifications"], a[href="/feeds"]');
    if (!ref) { ref = nav.firstElementChild; }
    if (!ref) { return; }
    var a = document.createElement('a');
    a.id = 'jz-bsk-bookmarks-link';
    a.href = '/bookmarks';
    a.textContent = 'Bookmarks';
    a.style.cssText = 'display:block;padding:10px 14px;color:inherit;font-weight:600;text-decoration:none;';
    ref.parentNode.insertBefore(a, ref.nextSibling);
  }
  inject();
  var obs = new MutationObserver(inject);
  obs.observe(document.body, { childList: true, subtree: true });
})();

How to use this example

  1. Copy the code with the button above.
  2. Install JustZix (2 minutes) and open the extension on the target page.
  3. Add a new rule matching that page.
  4. 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.

Does this example work?

Snippets are useless without somewhere to paste them.

JustZix takes 2 minutes to install and runs your code on every matching page. No account, no payment.

Download free See use cases