How scorpio-meow/threads-embedded-code works
Threads Code Saver is a Chromium extension for capturing embedded Threads posts, keeping structured records locally, and managing or exporting them through popup and dashboard interfaces. The main workflow begins on a Threads post, where the content script detects an embed dialog, extracts and cleans post data, and saves it. The README also documents dashboard preview and background refresh, plus search, filtering, batch management, import, and export. Source excerpts are partial, so uncertain internal wiring is omitted.
Main entry points: dashboard.js Dashboard · content.js Embed detection · popup.js Quick panel · popup.html Popup interface
Components 17
Capture and extraction
- Embed detection
content.js - Post extraction
content.js - Text cleaning
content.js
Local persistence
- Saved articles
User interfaces
- Quick panel
popup.js - Popup interface
popup.html - Dashboard
dashboard.js - Dashboard interface
dashboard.html
Management and outputs
- Search and filters
popup.js - Batch management
dashboard.js - Post refresh
dashboard.js - Embed preview
dashboard.js - Import and export
dashboard.js - Popup transfer
popup.js
Other components
- Reader
- Threads page
- Browser APIs
Connections 21
- Reader → Threads page: views posts
- Threads page → Embed detection: opens embed dialog
- Embed detection → Post extraction: detects dialog
- Post extraction → Text cleaning: cleans extracted text
- Embed detection → Saved articles: saves article
- Embed detection → Browser APIs: uses storage API
- Reader → Popup interface: opens panel
- Popup interface → Quick panel: hosts
- Quick panel → Saved articles: reads and writes
- Quick panel → Search and filters: filters and sorts
- Reader → Dashboard interface: opens dashboard
- Dashboard interface → Dashboard: hosts
- Dashboard → Saved articles: reads and writes
- Dashboard → Batch management: manages selection
- Dashboard → Post refresh: starts refresh
- Post refresh → Browser APIs: creates worker tab
- Post refresh → Threads page: loads post pages
- Dashboard → Embed preview: opens preview
- Embed preview → Threads page: loads official embed
- Dashboard → Import and export: imports and exports
- Quick panel → Popup transfer: imports and exports