Press Ctrl+E to get friendly CSS selectors for any element
A powerful userscript that provides developer-friendly CSS selectors for any DOM element with visual highlighting and a hierarchical tree view.
Why it’s useful: Click any element to copy a precise, unique selector so AI or automation can generate a working userscript faster with fewer mistakes.
Ctrl+E, you can change this in the menu *Ctrl+E on any webpageCtrl+E again to exit selector modeThe tool generates selectors in this priority order:
#unique-id (most reliable)[data-testid], [data-cy], [data-test]
button.primary.large (avoids hashed/dynamic classes)[role="button"], [aria-label="Close"]
input[name="email"], button[type="submit"]
label[for="id"]:has(+ input)
:nth-of-type when neededFeel free to submit issues or pull requests to improve the tool's selector generation or user experience.
This project is licensed under the Apache License, Version 2.0 with Commons Clause License Condition v1.0 - see the LICENSE file for details.