A Chrome extension that applies the Socratic three-part test to social media posts: "Is it True? Is it Good? Is it Helpful?"
Posts that pass all three tests are shown normally. Posts that fail any test are hidden behind expandable spoilers with explanations.
- Socratic Philosophy: Applies Aristotle's three fundamental questions to filter content
- AI-Powered Analysis: Uses configurable AI models (OpenAI, DeepSeek, etc.) for intelligent content evaluation
- Text-Based Filtering: Currently analyzes text content only (images/videos planned for future versions)
- Smart Caching: Analyzes each post only once, storing results locally for efficiency
- Batch Processing: Processes multiple posts simultaneously for better performance
- Non-Destructive: Good content stays visible; problematic content is merely hidden behind spoilers
- Cost Optimized: Intelligent caching reduces API costs by 80-90%
This extension is built on the principle that good information should flow freely, while potentially harmful, false, or unhelpful content should require deliberate user action to view.
We do not aim to harm or censor anyone. Our goal is to promote thoughtful consumption of information by applying classical philosophical principles to modern social media.
- Chrome browser
- Node.js (v16 or higher)
- npm
-
Clone the repository
git clone https://github.com/Lomet/postFilter.git cd postFilter
-
Install dependencies
npm install
-
Build the extension
npm run build
-
Load in Chrome
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select the
postFilter
folder - The extension should now appear in your extensions list
- Open Chrome and navigate to
-
Configure AI Settings
- Click the extension icon in Chrome toolbar
- Enter your AI configuration:
- AI URL: Your AI endpoint (e.g.,
https://api.openai.com/v1
orhttps://openrouter.ai/api/v1
) - AI Key: Your API key
- AI Model: Model name (e.g.,
gpt-4
,deepseek/deepseek-chat-v3
)
- AI URL: Your AI endpoint (e.g.,
- Set batch size (recommended: 3-5 posts per batch)
- Enable the extension
-
Visit X.com
- The extension will automatically start analyzing posts
- Check browser console (F12) for detailed logging
- Posts that pass all tests appear normally
- Posts that fail are hidden behind spoilers
The extension supports any OpenAI-compatible API:
- OpenAI:
https://api.openai.com/v1
- OpenRouter:
https://openrouter.ai/api/v1
- DeepSeek: Via OpenRouter
- Local LLMs: Any compatible endpoint
- Batch Size: Number of posts analyzed together (1-25)
- Batch Delay: Delay between batches in milliseconds
- Posts are cached locally in browser storage
- Cache automatically expires after 7 days
- Cache size limited to 500 entries
- Clear cache by deleting
postFilter_cache
in DevTools
postFilter/
βββ src/
β βββ main.ts # Entry point
β βββ domUtils.ts # DOM manipulation utilities
β βββ observer.ts # MutationObserver for dynamic content
β βββ postProcessing.ts # Post processing pipeline
β βββ spoiler.ts # Spoiler element creation
β βββ postHandlers/
β βββ postAnlizer.ts # AI analysis and batch processing
βββ manifest.json # Chrome extension manifest
βββ settings.html # Extension popup interface
βββ settings.js # Popup logic
βββ content.js # Built output file
βββ rollup.config.mjs # Build configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Dependencies and scripts
npm run build
- Build the extensionnpm run dev
- Build in development mode with watching
- TypeScript - Type-safe development
- Rollup - Module bundling
- OpenAI SDK - AI integration
- Chrome Extensions API - Browser integration
We welcome contributions! Please follow these guidelines:
-
Fork the repository
git fork https://github.com/Lomet/postFilter.git
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow existing code style
- Add comments for complex logic
- Test thoroughly with different AI providers
-
Test your changes
- Build the extension:
npm run build
- Load in Chrome and test on X.com
- Check console for errors
- Verify caching works correctly
- Build the extension:
-
Commit with clear messages
git commit -m "feat: add support for custom AI prompts"
-
Push and create PR
git push origin feature/your-feature-name
- Open a Pull Request on GitHub
- Describe what your changes do
- Include screenshots if UI changes
- Reference any related issues
- Code Quality: Follow TypeScript best practices
- Testing: Test with multiple AI providers and batch sizes
- Documentation: Update README for new features
- Performance: Consider impact on API costs and browser performance
- Philosophy: Maintain the core Socratic principles
- Ethics: Ensure changes promote thoughtful information consumption
- UI Improvements: Better settings interface, visual indicators
- AI Providers: Support for new AI services
- Performance: Optimization for large timelines
- Features: Custom filtering rules, user preferences
- Accessibility: Screen reader support, keyboard navigation
- Internationalization: Multi-language support
MIT License
Copyright (c) 2025 PostFilter Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
"AI not configured" error
- Ensure you've entered valid AI URL, key, and model in settings
- Check that your API key has sufficient credits
-
No posts being filtered
- Open browser console (F12) and check for errors
- Verify extension is enabled in settings
- Check that you're on x.com (not twitter.com)
-
All posts showing "Content too short"
- This indicates the extension can't extract post content
- Check console for DOM selector issues
- X.com may have changed their HTML structure
-
High API costs
- Reduce batch size in settings
- Check cache is working (look for "Cache HIT" in console)
- Consider using cheaper AI models
Enable detailed logging by opening browser console (F12). You'll see:
- Post extraction and analysis
- AI requests and responses
- Cache hits/misses
- Batch processing details
-
Text-Only Analysis
- Issue: The extension currently only analyzes text content from posts
- Impact: Posts with images, videos, GIFs, or other media are evaluated based solely on their text captions/descriptions
- Example: A post with a misleading image but accurate text caption might pass the filter
- Workaround: Users should manually review media-heavy posts
- Future: Planned support for image analysis using vision-capable AI models
-
Dynamic Content Loading
- Issue: X.com loads content dynamically as users scroll
- Impact: Some posts may not be analyzed immediately upon appearing
- Status: Partially mitigated by MutationObserver, but edge cases remain
-
Rate Limiting
- Issue: Heavy usage may hit AI provider rate limits
- Impact: Temporary delays in post analysis
- Workaround: Increase batch delay in settings or use providers with higher limits
-
Language Support
- Issue: Analysis quality varies by language
- Impact: Non-English posts may receive less accurate evaluations
- Status: Depends on AI model's language capabilities
-
Context Understanding
- Issue: Posts referencing external context may be misunderstood
- Impact: Sarcasm, references, or ongoing conversations might be misanalyzed
- Note: This is a fundamental limitation of text-based AI analysis
- πΌοΈ Vision Analysis: Integration with GPT-4V or similar models for image/video content analysis
- π Multi-language: Better support for non-English content
- β‘ Performance: Optimized DOM detection for faster processing
- π― Context Awareness: Improved understanding of conversational context
- π Analytics: Usage statistics and filtering effectiveness metrics
When reporting bugs, please include:
- Steps to reproduce
- Browser console output
- Chrome version
- Extension version
- AI provider being used
- Type of content (text-only, with images, videos, etc.)
Before suggesting features, consider:
- Does it align with Socratic principles?
- Does it promote thoughtful information consumption?
- Is it technically feasible?
- Would it benefit the broader community?
This extension embodies the belief that information should be evaluated thoughtfully rather than consumed passively. By applying Socratic questioning to social media content, we aim to:
- Promote Truth: Surface accurate, factual information
- Encourage Goodness: Highlight constructive, positive content
- Ensure Utility: Prioritize helpful, valuable information
We believe in empowering users with tools for critical thinking, not in making decisions for them. The extension merely provides a philosophical lens through which to view informationβthe choice of what to engage with remains entirely with the user.
"The unexamined life is not worth living." - Socrates
Made with π§ for thoughtful information consumption.