Skip to content

srikanta30/predator-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦅 Predator AI - Powered by ChatGPT

Transform any website into an AI-powered experience with ChatGPT integration

Predator AI is a powerful Chrome extension that seamlessly integrates ChatGPT's capabilities into any website you visit. Simply type predator: followed by your prompt, and watch as AI enhances your content across text areas, code editors, and more.

✨ Features

🎯 Universal Compatibility

  • Works on any website - No restrictions, works everywhere
  • Smart text detection - Automatically finds text areas, code editors, and input fields
  • Real-time processing - Instant AI responses as you type

🌐 Site-Specific Optimizations

Enhanced functionality for popular platforms:

  • Gmail - AI-powered email composition
  • LeetCode - Intelligent coding assistance
  • Twitter - Enhanced tweet writing
  • Google Sheets - Smart spreadsheet content
  • Facebook - Improved post creation
  • Reddit - Better comment writing
  • Microsoft Teams - Enhanced messaging

🔧 Technical Features

  • Chrome Extension Manifest V3 - Latest security standards
  • Secure API key storage - Your OpenAI API key is safely stored locally
  • Debounced processing - Optimized performance with smart timing
  • Loading indicators - Visual feedback during AI processing
  • Error handling - Graceful fallbacks and user notifications

🚀 Installation

Prerequisites

  • Chrome browser (or Chromium-based browser)
  • OpenAI API key (Get one here)

Setup Steps

  1. Download the Extension

    # Clone or download this repository
    git clone https://github.com/srikanta30/predator-ai
    cd predator-ai
  2. Load in Chrome

    • Open Chrome and navigate to chrome://extensions/
    • Enable "Developer mode" (toggle in top-right)
    • Click "Load unpacked" and select the predator-ai folder
  3. Configure API Key

    • Click the Predator AI icon in your browser toolbar
    • Enter your OpenAI API key
    • Click "Save"
  4. Start Using

    • Visit any website
    • Type predator: followed by your prompt in any text area
    • Watch as AI enhances your content!

📖 Usage

Basic Usage

predator: Write a professional email about project updates
predator: Explain this code in simple terms
predator: Make this text more engaging
predator: Summarize the key points

Supported Elements

  • Text areas (<textarea>)
  • Input fields (<input>)
  • ContentEditable elements
  • CodeMirror editors
  • Role-based textboxes (role="textbox")
  • Comboboxes (role="combobox")

Site-Specific Examples

Gmail:

predator: Write a follow-up email for the meeting we had yesterday

LeetCode:

predator: Optimize this solution for better time complexity

Twitter:

predator: Make this tweet more engaging and add relevant hashtags

🔧 Configuration

API Key Management

  • Your API key is stored securely in Chrome's sync storage
  • Keys are encrypted and only accessible to this extension
  • You can update your API key anytime through the popup

Customization

The extension automatically detects and processes text areas. For advanced customization, you can modify the content scripts in the sites/ directory.

🛠️ Development

Project Structure

predator-ai/
├── manifest.json          # Extension configuration
├── popup.html             # Extension popup interface
├── popup.js               # Popup functionality
├── common.js              # Shared utilities and API calls
├── all.js                 # Universal text processing
├── event.js               # Event handling
├── sites/                 # Site-specific optimizations
│   ├── gmail.js
│   ├── leetcode.js
│   ├── twitter.js
│   └── ...
└── icons/                 # Extension icons

Key Components

  • common.js - Core API integration and text parsing
  • all.js - Universal text area detection and processing
  • event.js - Event listeners and user interaction handling
  • sites/*.js - Platform-specific optimizations

Building

No build process required - this is a pure JavaScript Chrome extension.

🔒 Privacy & Security

  • Local Processing - All text processing happens locally in your browser
  • Secure Storage - API keys are encrypted and stored securely
  • No Data Collection - We don't collect or store your personal data
  • Open Source - Full transparency with open source code

🐛 Troubleshooting

Common Issues

Extension not working:

  • Ensure your API key is correctly saved
  • Check that the extension is enabled in chrome://extensions/
  • Verify you have an active internet connection

Text not being processed:

  • Make sure you're typing predator: at the beginning of your text
  • Check that the text area is supported (see Usage section)
  • Try refreshing the page

API errors:

  • Verify your OpenAI API key is valid and has credits
  • Check your OpenAI account for any usage limits

📝 License

This project is open source. Please check the license file for details.

👨‍💻 Author

Srikanta Banerjee

  • Built with ❤️ for the developer community
  • Empowering users with AI capabilities across the web

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Areas for Contribution

  • Additional site-specific optimizations
  • Performance improvements
  • Bug fixes and error handling
  • Documentation improvements
  • New features and functionality

📞 Support

If you encounter any issues or have questions:

  1. Check the troubleshooting section above
  2. Open an issue on GitHub
  3. Review the code for site-specific implementations

Ready to unleash the power of AI on any website? Install Predator AI today! 🚀

About

Predator - a chrome extension that allows you to use ChatGPT on any website.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published