How jraversbcn21/snaplink works
SnapLink turns a page’s visible title and cleaned URL into a copyable link. The user can start from the popup, review or edit the title, and copy rich HTML/plain text or Markdown; alternatively, a keyboard shortcut requests a rich-link copy and displays a page toast. The content script detects platform-specific titles with generic fallbacks, while the popup also supports ticket-ID stripping and plain-URL copying. The graph separates those domain stages and the shortcut dispatcher. Source evidence shows the key calls; popup presentation details and some behavior are documented only in the README.
Main entry points: popup.js Popup controller · content.js Title detection · popup.html Popup interface · background.js Shortcut dispatcher
Components 13
Popup workflow
- Popup interface
popup.html - Popup controller
popup.js - Ticket ID option
popup.js - Markdown option
popup.js
Page processing
- Title detection
content.js - URL cleaning
content.js - Rich link writer
content.js - Page toast
content.js
Shortcut workflow
- Shortcut dispatcher
background.js
Other components
- User
- Visible page DOM
- System clipboard
- Keyboard shortcut
Connections 14
- User → Popup interface: opens
README.md - Popup interface → Popup controller: drives
README.md - Popup controller → Title detection: requests page info
popup.js - Visible page DOM → Title detection: provides visible text
content.js - Title detection → URL cleaning: returns cleaned URL
content.js - Popup controller → Ticket ID option: applies option
popup.js - Popup controller → Markdown option: applies format
popup.js - Popup controller → System clipboard: writes copy
popup.js - User → Keyboard shortcut: presses
README.md - Keyboard shortcut → Shortcut dispatcher: dispatches command
README.md - Shortcut dispatcher → Title detection: requests copy
background.js - Title detection → Rich link writer: supplies link data
content.js - Rich link writer → System clipboard: writes HTML and text
content.js - Rich link writer → Page toast: shows confirmation
content.js