Link Search is a Chrome extension that provides fast in-page link searching with advanced search modes and keyboard navigation. Users can quickly find and navigate to any link or button on a webpage using regular text search or smart word prefix matching, without scrolling or using the mouse.
- In-page search overlay - Appears centered at the top of any webpage
- Real-time filtering - Links are filtered as you type with multiple search modes
- Visual highlighting - Matching links are highlighted on the page
- Keyboard navigation - Navigate between results using multiple methods
- Link preview - Shows destination URL in bottom-left corner
- Button support - Can search and interact with buttons in addition to links
- Smart word search - Match word prefixes in sequence for faster navigation
- Case-sensitive search - Optional exact case matching
- Configurable minimum characters - Set via options page (1-10 characters, default: 1)
- Smart word search - Match word prefixes in sequence (e.g., "he w" finds "hello world")
- Case-sensitive option - Toggle between case-sensitive and case-insensitive search
- Text-based search - Searches only in visible link text, not URLs
- Include/exclude buttons - Configure button searching via options page
- Instant results - No delay, results appear immediately
- Arrow keys - ↑/↓ to move between results
- Tab navigation - Tab/Shift+Tab to move between results
- Mouse navigation - Click on ↑/↓ buttons in search bar
- Direct click - Click on highlighted links (though not the primary use case)
- Ctrl+Q - Primary keyboard shortcut
- Ctrl+Shift+Q - Alternative keyboard shortcut
- Extension icon click - Click the extension icon in toolbar
[Search input field] [↑] [↓] [2/5]
Components:
- Search input - Text field for typing search query
- Navigation buttons - ↑/↓ buttons for mouse navigation
- Counter - Shows current selection and total results (e.g., "2/5")
Note: The "Include buttons" option has been moved to the options page for a cleaner interface.
- Shows full URL for links
- Shows "[Button] button text" for buttons
- Only visible when a result is selected
- Automatically hides when no results
- All matches - Yellow background with orange border
- Selected match - Blue background with pulsing animation and scale effect
- Auto-scroll - Page automatically scrolls to selected element
link-search-extension/
├── manifest.json # Extension configuration (Manifest V3)
├── content.js # Main functionality (modular architecture)
├── content.css # Styling for search overlay and highlighting
├── popup.html # Popup when clicking extension icon
├── popup.js # Popup functionality
├── background.js # Background service worker
├── options.html # Settings page UI
└── options.js # Settings page functionality
The main content script uses a modular namespace pattern with these modules:
LinkSearchState- Central state object containing all runtime data
- Settings - Manages configuration loading/saving
- UI - Handles overlay creation and updates
- Scanner - Scans page for searchable elements
- Search - Core search functionality and filtering
- Highlighter - Manages visual highlighting of elements
- Navigation - Keyboard and programmatic navigation
- Actions - Handles opening links/clicking buttons
- App - Main application controller
- Links:
a[href]elements with non-empty text - Buttons:
button,input[type="button"],input[type="submit"],[role="button"] - Text sources:
textContent,value,aria-labelattributes - Filtering: Only elements with visible text are included
- All settings - Stored in chrome.storage.sync (syncs across devices)
- Settings page - Accessible via right-click menu or extension details
- Available options:
- Minimum characters to search (1-10, default: 1)
- Smart word search (default: off)
- Include buttons in search (default: on)
- Case-sensitive search (default: off)
- User presses Ctrl+Q on any webpage
- Search overlay appears centered at top of page
- User types part of a link text (e.g., "contact" or "con us" with smart search)
- Matching links are highlighted on the page
- First match is automatically selected (blue highlight)
- URL preview appears in bottom-left corner
- User navigates with ↑/↓ or Tab/Shift+Tab
- User presses Enter to open selected link
- Extension closes and navigates to the link
- Smart word search - Enable in options to search by word prefixes ("con us" finds "contact us")
- Case-sensitive search - Enable in options for exact case matching
- Button searching - Configure in options to include/exclude buttons from search
- Minimum characters - Set higher threshold in options to reduce noise
- External links - Open in new tab automatically
- Internal links - Open in same tab
"permissions": [
"activeTab", # Access to current tab for content injection
"storage", # For saving user preferences
"contextMenus" # For right-click options menu
]- Chrome - Full support (Manifest V3)
- Edge - Should work (Chromium-based)
- Firefox - Would need Manifest V2 version
- Single tab operation - Only works on currently active tab
- Text-only search - Cannot search by URL or CSS selectors
- No search history - Each search session starts fresh
- No regex support - Only simple string matching and word prefix matching
- No custom shortcuts - Fixed keyboard shortcuts only
- Sequential word matching - Smart word search requires words in order
- Lazy loading - Elements are scanned only when search is activated
- Efficient filtering - Uses native array methods for fast filtering
- Minimal DOM impact - Only adds CSS classes for highlighting
- Memory management - State is reset when overlay is closed
- CSP compliant - No inline scripts (Manifest V3 requirement)
- Minimal permissions - Only requests necessary permissions
- No external requests - All functionality is local
- No data collection - Settings stored locally only
- Namespace pattern - Avoids global scope pollution
- No
thiscontext - Explicit namespace calls for reliability - CSS-only highlighting - No complex DOM manipulation
- Event delegation - Efficient event handling
- Graceful fallbacks - Works even if some features fail
- Installation - Manifest is processed, permissions requested
- Page load - Content script injected into each page
- Activation - User triggers search (Ctrl+Q or icon click)
- Runtime - Search overlay active, responsive to user input
- Deactivation - Overlay closed, page returns to normal state
- High z-index values (999999) to appear above page content
!importantdeclarations for critical styling- Unique class names to avoid conflicts
- Scoped selectors to prevent style bleeding
- Fuzzy search support
- Search history/favorites
- Custom keyboard shortcuts
- Multi-tab search
- URL-based searching
- Regular expression support
- Theme customization
- Search analytics/metrics
- Non-sequential word matching for smart search
- Highlight matching portions within text
- Improve readability for dark pages.
- Performance optimization for large pages
- Internationalization (i18n)
- Extension not working - Check if content script is injected
- Keyboard shortcuts not working - Check for conflicts with other extensions
- Settings not saving - Verify chrome.storage permissions
- Links not highlighting - Check CSS injection and z-index values
- Preview not showing - Verify DOM element creation and positioning