A powerful Chrome Manifest V3 extension that provides advanced HTML element selection and copying capabilities with hotkey navigation, customizable keybinds, and intelligent auto-scrolling.
- Right-click to copy: Traditional context menu for quick element copying
- Hotkey selection: Use
Ctrl+Shift+Cto instantly copy elements under cursor - DOM navigation: Navigate through parent/child elements with customizable hotkeys
- Spatial navigation: Move between visually adjacent elements using
Ctrl+Arrowkeys
- Parent/Child traversal: Move up and down the DOM tree with
Ctrl+Shift+↑/↓ - Visual spatial movement: Navigate left, right, up, down based on element positioning
- Smart auto-scrolling: Viewport automatically follows selected elements
- Visual feedback: Red highlight overlay shows currently selected element
- Element stack info: See your position in the DOM hierarchy
- Rebindable hotkeys: Customize all keybinds through the popup interface
- Conflict detection: Prevents duplicate keybind assignments
- Enable/disable toggle: Turn extension on/off without removal
- Persistent settings: All preferences saved across browser sessions
- Visual preview: Hold
Ctrlwhile hovering to preview selectable elements - Smart notifications: Context-aware feedback messages
- Element information: Shows tag name, classes, and ID of selected elements
- Smooth scrolling: Automatically centers selected elements in viewport
- Universal compatibility: Works on any website
| Action | Default Keybind | Description |
|---|---|---|
| Copy Element | Ctrl+Shift+C |
Copy element under cursor |
| Select Parent | Ctrl+Shift+↑ |
Navigate to parent element |
| Select Child | Ctrl+Shift+↓ |
Navigate to child element |
| Copy Selected | Ctrl+Shift+Enter |
Copy currently selected element |
| Cancel Selection | Escape |
Clear current selection |
| Spatial Navigation | Ctrl+Arrow Keys |
Move to adjacent elements |
All keybinds can be customized through the extension popup!
- Download or clone this repository
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked" and select the extension folder
- The extension will be installed and ready to use
- Navigate to any webpage
- Right-click on any HTML element
- Select "Copy Element" from context menu
- Element HTML is copied to clipboard
- Start selection: Press
Ctrl+Shift+Con any element - Navigate DOM: Use
Ctrl+Shift+↑/↓to move through parent/child elements - Spatial movement: Use
Ctrl+Arrow Keysto move to visually adjacent elements - Copy selection: Press
Ctrl+Shift+Enterto copy the selected element - Cancel: Press
Escapeto clear selection
- Click the extension icon in the toolbar
- Click the edit button (✏️) next to any keybind
- Press your desired key combination
- Save changes (automatically prevents conflicts)
- Use the toggle switch in the popup to enable/disable the extension
- When disabled, all hotkeys and visual feedback are turned off
When you select an element like this:
<span class="payment-summary__price-column-total h2" data-v-0ce13794="">
$9.49
</span>The complete HTML will be copied to your clipboard, including all classes, attributes, and content.
- Quick navigation: After selecting an element with
Ctrl+Shift+C, immediately use arrow keys to explore the DOM - Spatial precision: Use
Ctrl+Arrowkeys to jump between visually related elements (like menu items or grid cells) - Visual feedback: Watch the red highlight overlay to see exactly what you're selecting
- Auto-scrolling: Selected elements automatically scroll into view, so you never lose track
- Keybind conflicts: The extension prevents duplicate keybinds and shows warnings for conflicts
This extension requires the following permissions:
contextMenus: To add the "Copy Element" option to the right-click menuactiveTab: To access the current tab and copy elementsscripting: To inject the copy functionality into web pagesstorage: To save your custom keybinds and preferences
Element-Copy/
├── manifest.json # Extension manifest (V3)
├── background.js # Service worker for context menu and messaging
├── content.js # Content script for element interaction and navigation
├── popup.html # Extension popup interface with settings
├── popup.js # Popup logic for keybind customization
├── icons/ # Extension icons (16px, 32px, 48px, 128px)
└── README.md # Documentation
- Manifest Version: 3 (latest Chrome extension standard)
- Service Worker: Handles context menu creation, clicks, and cross-tab messaging
- Content Script: Advanced DOM navigation, spatial algorithms, and clipboard operations
- Modern APIs: Uses
navigator.clipboardwith comprehensive fallback support - Smart Algorithms: Spatial navigation uses distance-based scoring for optimal element selection
- Auto-scrolling: Intelligent viewport management with edge detection and smooth centering
- Chrome 88+ (Manifest V3 requirement)
- Edge 88+ (Chromium-based)
- All modern Chromium-based browsers
This project is open source and available under the MIT License.
Feel free to submit issues, fork the repository, and create pull requests for any improvements. Contributions are welcome for:
- New navigation features
- UI/UX improvements
- Cross-browser compatibility
- Performance optimizations
- Bug fixes and testing
If you encounter any issues or have suggestions, please create an issue in the repository.