add people to your x / twitter lists without leaving their profile. a small chrome extension that puts an "add to list" dropdown right next to the follow button.
- one-click list management: an "add to list" button injected on every profile page
- see where they already are: lists the person is already in show up highlighted with a check mark
- toggle in place: click a list to add the person, click again to remove them
- no api keys: it reuses your logged-in x.com session, nothing to configure
- matches x's look: dark dropdown styled to sit next to x's own buttons
flowchart LR
P[x.com profile page] -->|MutationObserver finds<br/>the profile action buttons| CS[content scripts]
CS -->|inject 'add to list' dropdown| P
CS <-->|chrome.runtime messages| BG[background service worker]
BG -->|webRequest: capture<br/>auth + csrf headers| X[x.com requests]
BG -->|ListOwnerships · memberships<br/>ListAddMember · ListRemoveMember| API[x.com internal api]
- the background worker watches your normal x.com traffic and captures the
authorizationandx-csrf-tokenheaders - with those, it fetches the lists you own
- when you open a profile, the content scripts ask which of your lists that user is already in, then render the dropdown
- clicking a list calls x's own add / remove member endpoints with your session
- vanilla javascript, no build step, no dependencies
- chrome extension manifest v3 (service worker + content scripts)
- permissions:
webRequest,scripting,activeTab,cookies, scoped tohttps://x.com/*
the extension isn't on the chrome web store; load it unpacked:
git clone https://github.com/kjhq/easy-twitter-lists.git- open
chrome://extensions - turn on developer mode
- click load unpacked and pick the
easy-twitter-listsfolder - open x.com while logged in, scroll your feed for a moment so the extension can capture your session, then visit any profile
on any profile, click add to list next to the follow button. lists the person is already in are highlighted; click any list to toggle membership.
- relies on x's internal graphql endpoints, which can change without notice
- the list-fetch query in
background_capture_lists.jscurrently has a hardcoded owner user id; change it to your own account id to load your lists - your lists are fetched once per session; new lists need a reload (#2)
- chrome only for now (#1)
easy-twitter-lists/
├── manifest.json
├── background.js # service worker entry, imports the modules below
├── background_header.js # captures auth / csrf headers from x.com traffic
├── background_capture_lists.js # fetches the lists you own
├── background_is_member.js # which of your lists a user is in
├── background_add_member.js # add / remove list member
├── content_is_profile.js # detects profile pages (MutationObserver)
├── content_add_lists.js # builds the dropdown with list state
├── content_initalize_list.js # dropdown behaviour + toggle clicks
├── content_html.js # dropdown markup + styles
├── content.js
└── index.html # standalone dropdown mockup
see open issues for planned work.