Vimeo: jump to search with the / key
Lets you instantly place the cursor in the search field by pressing the slash key.
Code to copy
// Press "/" to jump straight into the search box
document.addEventListener('keydown', function (e) {
if (e.key !== '/') return;
const tag = (e.target.tagName || '').toLowerCase();
if (tag === 'input' || tag === 'textarea' || e.target.isContentEditable) return;
const box = document.querySelector('input[type="search"], input[name="q"], [role="search"] input');
if (box) { e.preventDefault(); box.focus(); }
});
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.