๐ About the Project: Click-Line
๐ Inspiration
Click-Line was born out of frustration with messy, off-by-one text selections and endless copy-paste cleanup while working on research pages, docs, and chat apps.
I wanted three things:
- Clean, word-perfect selection โ no dangling spaces or chopped words.
- Fast multi-selection โ grab multiple snippets and copy them all at once.
- Smarter Enter key control โ avoid fighting sites when sending vs. adding a newline.
That โone small annoyance, repeated thousands of timesโ feeling was the real spark behind this project.
๐ How I Built It
๐น Platform
- Chrome Extension (Manifest V3)
๐น Architecture
- Content script
Handles selection snapping, multi-selection, highlighting, Alt+Drag link copy, and Enter behavior tweaks. - Background service worker
Powers right-click (context menu) search actions. - Popup UI (HTML/CSS/JS)
Settings, rules, and quick toggles.
๐น Data Flow
- Settings stored in
chrome.storage.local - Live sync via
chrome.storage.onChanged - No
tabspermission or broadcasting
๐น Selection & Highlighting
- Word snapping: via DOM Range API + configurable regex (e.g.,
\w\-) - Highlighting:
- Uses CSS Custom Highlight API when available
- Falls back to a lightweight overlay div system
- Uses CSS Custom Highlight API when available
- Performance: redraws handled with
requestAnimationFrame, scroll/resize safe
๐น Editor Handling
- Smart Enter behavior
Enter= newlineShift+Enter= send
- Heuristics include:
enterkeyhintdetection (send,go,search)- helper text like โShift+Enter to add a new lineโ
- Special case: ChatGPT (ProseMirror quirks โ fixed spacing + true breaks)
- Exclusions: Code editors like Monaco, CodeMirror, Ace
๐น UX Shortcuts
Ctrl+Dragโ add selectionsCtrl+Cโ copy combined (newline / space / bullet separated)Ctrl+Z / Ctrl+Yโ undo/redoCtrl+Shift+Lโ lock selectionsEscโ clearAlt+Dragon a link โ copy URL (subtle toast confirmation)- Context menu โ quick search (Google / YouTube / Wikipedia)
๐น Permissions
storage,clipboardWrite,contextMenushost_permissions: <all_urls>โ runs automatically everywhere- No:
tabs, optional permissions, remote code, or analytics
โก Challenges & Solutions
Consistent word snapping across complex DOMs
โ Robust Range boundary logic + TreeWalker fallbackReliable highlighting across browsers
โ CSS Highlight API where possible; overlay fallback otherwiseAvoid breaking site/editor behavior
โ Capture-phase key handling with strict editable checksProseMirror quirks (ChatGPT newlines/spaces)
โ Careful caret + node handlingPerformance with multiple selections
โ Batched DOM updates +requestAnimationFramerenderingChrome Web Store review hurdles
โ Trimmed unused code & permissions, aligned justifications with actual features
๐ What I Learned
- The CSS Custom Highlight API gives smooth UX with almost no DOM churnโbut fallbacks are mandatory.
- MV3 service workers + content scripts work best when the heavy lifting stays in the content layer.
- Input behavior heuristics need to be conservativeโeditor ecosystems vary a lot.
- Fewer permissions + clear docs = easier reviews and higher user trust.
- Tiny UX touches (toast notifications, lock mode, undo/redo) add disproportionate value to perceived quality.
โจ Thatโs Click-Line: a small tool to fix the tiny paper-cuts of everyday browsing, so you can stay focused on your work instead of fighting the UI.


Log in or sign up for Devpost to join the conversation.