Browser Extension
Chrome/Edge extension for XActions. Run automation directly from the browser toolbar — no DevTools console needed.
Install
From Source (Developer Mode)
- Clone the repo or download the
extension/directory - Open
chrome://extensions(Chrome) oredge://extensions(Edge) - Enable Developer mode (toggle in top right)
- Click Load unpacked
- Select the
extension/folder - The XActions icon appears in your toolbar
Permissions
The extension requests:
| Permission | Why |
|---|---|
activeTab |
Interact with the current x.com tab |
storage |
Save settings and session state |
scripting |
Inject automation scripts into x.com |
alarms |
Schedule recurring tasks |
contextMenus |
Right-click menu integration |
notifications |
Desktop alerts for completed tasks |
Host permissions: https://x.com/* and https://twitter.com/* only.
Usage
Popup Interface
Click the XActions icon in your toolbar to open the popup:
- Connection status — green dot when connected to x.com, red when disconnected
- Account info — shows your X username and avatar when connected
- Pause All — pause all running automations
- Emergency Stop — immediately halt everything
Tabs
Automations — start/stop automation scripts:
- Unfollow non-followers
- Auto-like by feed/hashtag/user
- Keyword follow
- Smart unfollow
- Growth suite
Activity — live log of actions taken (likes, follows, unfollows).
Settings — configure:
- Default delays between actions
- Rate limit behavior
- Notification preferences
- Dark/light theme
Running an Automation
- Navigate to x.com in your browser
- Click the XActions icon
- Verify the green "Connected" status
- Go to the Automations tab
- Select an automation (e.g., "Unfollow Non-Followers")
- Configure options (batch size, delay, etc.)
- Click Start
- Watch progress in the Activity tab
Architecture
extension/
├── manifest.json # MV3 manifest
├── background/
│ └── service-worker.js # Background service worker
├── content/
│ ├── bridge.js # Content script (injected into x.com)
│ └── injected.js # Web-accessible script for DOM access
├── popup/
│ ├── popup.html # Popup UI
│ ├── popup.css # Styles
│ └── popup.js # Popup logic
└── icons/ # Extension icons (16/32/48/128px)
How It Works
- Content script (
bridge.js) is injected into x.com pages atdocument_idle - Injected script (
injected.js) is loaded as a web-accessible resource for direct DOM manipulation - Popup communicates with the content script via
chrome.runtime.sendMessage - Service worker handles alarms, context menus, and background scheduling
Message Passing
Popup ⟷ Service Worker ⟷ Content Script ⟷ Injected Script ⟷ x.com DOM
The content script bridges between the extension context and the page context, since MV3 extensions can't directly access page JavaScript.
Development
Generate Icons
cd extension
node generate-icons.cjs
Creates icons from the source SVG at all required sizes (16, 32, 48, 128px).
Test Changes
- Make edits to files in
extension/ - Go to
chrome://extensions - Click the refresh icon on the XActions extension card
- Open a new x.com tab to test
Debugging
- Popup: Right-click the XActions icon → "Inspect Popup"
- Service worker: Click "Service Worker" link on
chrome://extensions - Content script: Open DevTools on any x.com tab → Sources → Content Scripts → XActions
Limitations
- Only works on
x.comandtwitter.comdomains - Requires an active x.com tab with a logged-in session
- Cannot bypass X's rate limits — respects the same delays as browser scripts
- MV3 service workers may go idle; alarms are used for reliable scheduling