How rraphaelph/instaunf works
InstaUnf is a Chrome extension for analyzing Instagram follow relationships and managing unfollows. The principal workflow starts in the popup: it identifies the logged-in account, loads cached analysis or fetches paginated following and follower lists, then filters and renders non-followers for individual or bulk unfollow and whitelist actions. Supporting branches track scan limits and analysis trends, refresh the toolbar badge, and expose a floating Instagram button that opens a detached popup. Popup excerpts show calls to API, cache, and whitelist functionality; links to other helpers are documented or uncertain where the excerpt omits wiring.
Main entry points: popup.js Popup workflow · service-worker.js Service worker · content.js Floating button · api.js Following fetch
Components 17
User interfaces
- Popup workflow
popup/popup.js - Floating button
content/content.js
Analysis and actions
- Following fetch
utils/api.js - Followers fetch
utils/api.js - Unfollow API
utils/api.js
Local state
- Analysis cache
utils/cache.js - Whitelist
utils/whitelist.js - Trend snapshots
utils/snapshot.js - Daily scan limits
utils/limits.js - Follower baseline
utils/notifications.js
Background integration
- Service worker
background/service-worker.js - Chrome badge
- Detached popup
Other components
- Toolbar user
- Instagram page
- Instagram API
- Chrome local storage
Connections 24
- Toolbar user → Popup workflow: opens
README.md - Popup workflow → Following fetch: requests
popup/popup.js - Popup workflow → Followers fetch: requests
popup/popup.js - Popup workflow → Analysis cache: loads and saves
- Popup workflow → Whitelist: reads and updates
popup/popup.js - Popup workflow → Unfollow API: invokes
popup/popup.js - Following fetch → Instagram API: fetches pages
utils/api.js - Followers fetch → Instagram API: fetches pages
utils/api.js - Unfollow API → Instagram API: posts unfollow
utils/api.js - Analysis cache → Chrome local storage: reads and writes
utils/cache.js - Whitelist → Chrome local storage: reads and writes
utils/whitelist.js - Trend snapshots → Chrome local storage: reads and writes
utils/snapshot.js - Daily scan limits → Chrome local storage: reads and writes
utils/limits.js - Follower baseline → Chrome local storage: reads and writes
utils/notifications.js - Popup workflow → Daily scan limits: checks limits
- Popup workflow → Trend snapshots: records trends
- Popup workflow → Follower baseline: updates baseline
- Instagram page → Floating button: hosts
README.md - Floating button → Chrome local storage: reads badge count
content/content.js - Floating button → Service worker: requests window
content/content.js - Popup workflow → Service worker: sends badge count
- Service worker → Chrome local storage: reads snapshots
background/service-worker.js - Service worker → Chrome badge: updates
background/service-worker.js - Service worker → Detached popup: creates
background/service-worker.js