← All examples

JavaScript Navigation vscode.dev

VS Code Web: quick link to the Extensions panel

Adds a floating button that fires Ctrl+Shift+X and opens the Extensions panel (works on github.dev too).

Code to copy

/* Floating quick-link to the Extensions panel (works on github.dev too) */
(function () {
  if (document.getElementById('vsc-ext-link')) return;
  const btn = document.createElement('button');
  btn.id = 'vsc-ext-link';
  btn.textContent = 'Extensions';
  Object.assign(btn.style, {
    position: 'fixed', right: '16px', bottom: '16px', zIndex: 99999,
    padding: '8px 14px', background: '#1f6feb', color: '#fff',
    border: 'none', borderRadius: '999px', boxShadow: '0 2px 10px rgba(0,0,0,0.3)',
    cursor: 'pointer', fontFamily: 'system-ui, sans-serif', fontSize: '12px'
  });
  btn.addEventListener('click', () => {
    const target = document.querySelector('.monaco-editor textarea.inputarea') || document.body;
    target.focus();
    target.dispatchEvent(new KeyboardEvent('keydown', {
      key: 'X', code: 'KeyX', ctrlKey: true, shiftKey: true,
      bubbles: true, cancelable: true
    }));
  });
  document.body.appendChild(btn);
})();

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