A Safari extension for filtering unwanted content on X (formerly Twitter) using AI-powered content analysis.
- 🎥 Video Filter: Automatically hide posts containing videos
- 🤖 AI-Powered Custom Filter: Use OpenAI's GPT-4o-mini to filter posts based on custom criteria
- 📸 Image Analysis: Analyzes both text and images in posts for comprehensive filtering
- 📢 Ad Blocker: Hide promoted posts and advertisements
- ⚙️ Customizable Prompts: Define your own filtering criteria (e.g., "political content", "sports", etc.)
- macOS 14.0 or later
- Xcode 15.0 or later
- Safari 17.0 or later
-
Clone the repository:
git clone https://github.com/yourusername/XedOutV2.git cd XedOutV2 -
Open the project in Xcode:
-
Build and run the project (⌘+R)
-
Enable the extension in Safari:
- Safari → Settings → Extensions
- Enable "X Content Filter"
- Get an OpenAI API key from platform.openai.com
- Add billing credits (minimum $5 recommended)
- Click the extension icon in Safari
- Enter your API key and click "Save"
Customize what content gets filtered by setting your own prompt:
Examples:
- "Analyze if the following content is political in nature."
- "Determine if this post contains sports-related content."
- "Check if this post discusses cryptocurrency or NFTs."
The AI will respond with true/false and hide matching posts.
- Navigate to x.com
- Click the extension icon
- Toggle filters on/off:
- Video Filter: Hide all video posts
- Custom Filter: Use AI to filter based on your prompt
- Ad Filter: Hide promoted content
Posts matching your filters will be automatically hidden as you scroll.
Using gpt-4o-mini (the default model):
- Text-only analysis: ~$0.001 per post
- With images: ~$0.01 per post
- $10 in credits ≈ 10,000 text posts or 1,000 posts with images
- All filtering happens locally in your browser
- API calls are made directly from the extension to OpenAI
- No data is stored or sent to third-party servers
- Your API key is stored locally in Safari
Content Script (JS) → Background Script (JS) → OpenAI API
↓ ↓
X/Twitter Analyzes Content
Website Returns Result
XedOutV2/
├── XedOutV2/ # Main app
│ ├── AppDelegate.swift
│ ├── ViewController.swift
│ └── Resources/
├── XedOutV2 Extension/ # Safari extension
│ ├── SafariWebExtensionHandler.swift
│ └── Resources/
│ ├── manifest.json
│ ├── background.js # API calls
│ ├── contentScript.js # Content filtering
│ ├── popup.html/js/css # Extension UI
│ └── icons/
└── README.md
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this project however you'd like.
- Add credits to your OpenAI account at platform.openai.com/account/billing
- Check that the extension is enabled in Safari Settings
- Reload the X/Twitter page
- Check the Safari Console for error messages
- Make sure you entered the key correctly
- Try re-entering the key and clicking "Save" again
- Support for additional AI providers (Anthropic Claude, Google Gemini)
- Filter statistics and analytics
- Whitelist/blacklist specific accounts
- Export/import filter configurations
- Multiple filter profiles
For issues, questions, or suggestions, please open an issue.
Made with ❤️ for a better browsing experience
.png)


