Xtension is a browser extension designed to enhance your X (formerly Twitter) experience by filtering out unwanted content such as engagement bait and inflammatory posts. By leveraging the power of Large Language Models (LLMs) from Groq's ultra-fast API, Xtension gives you greater control over what you see in your feed.
See How the Extension works here : https://drive.google.com/file/d/1rmFFxOHQR9XCX4I9Dm7Z-rC-NpTZfN00/view?usp=sharing
Xtension actively monitors your X feed as you scroll and dynamically filters tweets based on your preferences:
- Real-time Detection: The extension's content script, injected into the X webpage, detects new tweets as they appear in your viewport. It identifies tweets that are at least 30% visible on your screen.
- Content Analysis via Groq: When a new tweet is detected, its text content (currently text-only) is extracted and sent to Groq's API for analysis using a language model of your choice. This API call is handled efficiently within the extension's service worker.
- Intelligent Filtering: Based on the analysis from Groq, tweets identified as engagement bait, political content (or any other category defined by the user), are flagged for filtering.
- Dynamic Blurring and Hiding: The content script then modifies the style of these flagged tweets, blurring and effectively hiding them from your immediate view.
- User Control: You retain complete control. With a single click on a blurred tweet, you can instantly reveal its content.
- Customizable Filtering: The extension's settings page allows you to input your Groq API key and, more importantly, customize the system prompt used for content analysis. This enables you to fine-tune the filtering behavior according to your specific needs and preferences.
-
Clone the repository:
git clone <repository_url> cd xtension npm run build
-
Install the extension in Chrome (or Chromium-based browser):
- Open Chrome and navigate to
chrome://extensions/. - Enable "Developer mode" in the top right corner.
- Click "Load unpacked" in the top left corner.
- Select the directory where you cloned, and upload dist folder.
- Open Chrome and navigate to
-
Obtain your Groq API key:
- Sign up for an account on Groq's website.
- Retrieve your API key from your Groq dashboard.
-
Configure Xtension:
- Click on the Xtension icon in your browser's toolbar.
- Navigate to the extension's settings page.
- Enter your Groq API key in the designated field.
- Optionally, customize the system prompt to adjust how tweets are analyzed and filtered. Experiment with different prompts to achieve your desired filtering behavior.
- Frontend: REACT
- LLM Integration: Groq API
- Language Model: User-selectable LLM available through Groq's API
- Browser Compatibility: Chrome and other Chromium-based browsers
Contributions to Xtension are welcome! If you have ideas for improvements, new features, or bug fixes, please feel free to:
- Fork the repository.
- Create a new branch for your changes.
- Implement your changes and write clear commit messages.
- Submit a pull request.