Skip to content

A powerful Chrome extension that transforms text into different tones using AI. Select text on any webpage or paste it into the extension popup to change its tone to professional, happy, excited, and more!

Notifications You must be signed in to change notification settings

dishafaujdar/ToneShift

Repository files navigation

ToneShift - Chrome Extension

A powerful Chrome extension that transforms text into different tones using AI. Select text on any webpage or paste it into the extension popup to change its tone to professional, happy, excited, and more!

Features

🎭 Multiple Tone Options

  • Professional - Business-appropriate and formal
  • Happy - Positive and upbeat
  • Excited - High energy and enthusiastic
  • Angry - Frustrated and stern
  • Sarcastic - Witty and ironic
  • Formal - Academic and structured
  • Casual - Conversational and relaxed
  • Friendly - Warm and approachable

Easy Text Selection

  • Select text on any webpage to see a floating button
  • Click the button to instantly transform the selected text
  • Or paste text directly into the extension popup

🔄 Smart Text Replacement

  • Replace selected text directly on the webpage
  • Works with input fields, text areas, and editable content
  • Fallback to clipboard copy for protected content

📋 Convenient Actions

  • One-click copy to clipboard
  • View transformation history (last 5 transformations)
  • Clean, minimalist interface

Installation & Quick Start

Instant Setup (No API Key Needed!)

  1. Download or Clone

    git clone <repository-url>
    cd ToneShift
  2. Open Chrome Extensions

    • Navigate to chrome://extensions/
    • Enable "Developer mode" (toggle in top right)
  3. Load Extension

    • Click "Load unpacked"
    • Select the ToneShift folder
  4. Start Using Immediately!

    • Click the extension icon and start transforming text
    • Uses our provided API key for immediate access
    • No configuration required!

Optional: Get Your Own API Key (Recommended)

For unlimited usage and higher quotas:

  1. Get Free Gemini API Key

    • Visit Google AI Studio
    • Sign in with Google account
    • Click "Create API Key"
    • Copy the key (starts with AIza)
  2. Configure Extension

    • Click extension icon → Settings gear ⚙️
    • Paste your API key
    • Click "Save"

API System & Costs

🎁 Provided API (Free Trial)

  • Immediate access - No setup required
  • Limited quota - Shared among all users
  • Perfect for testing the extension

🚀 Your Own API Key (Recommended)

  • Google Gemini 1.5 Flash - Fast and reliable
  • FREE tier: 15 requests/minute, 1,500 requests/day
  • No credit card required for basic usage
  • Higher quotas available with paid plans

How to Use

Method 1: Text Selection

  1. Select text on any webpage
  2. Click the floating 🎭 button that appears
  3. Choose a tone from the options
  4. Click "Transform Text"
  5. Copy or replace the transformed text

Method 2: Manual Input

  1. Click the extension icon in your toolbar
  2. Paste or type text in the input area
  3. Select your desired tone
  4. Click "Transform Text"
  5. Copy the result to clipboard

Additional Features

  • View History: See your last 5 transformations
  • Reuse Previous: Click on any history item to reload it
  • Character Limit: Up to 2,000 characters per transformation
  • Keyboard Shortcuts: Press Escape to hide the floating button

Technical Details

File Structure

ToneShift/
├── manifest.json          # Extension configuration
├── popup.html             # Main popup interface
├── popup.js               # Popup logic and API calls
├── content.js             # Text selection and page interaction
├── content.css            # Styles for injected elements  
├── background.js          # Service worker for API handling
├── styles.css             # Main popup styles
├── icons/                 # Extension icons
│   ├── icon16.png
│   ├── icon48.png
│   └── icon128.png
└── README.md

Technologies Used

  • Manifest V3 - Latest Chrome extension format
  • Google Gemini API - Gemini 1.5 Flash for text transformation
  • Chrome Storage API - Settings and history persistence
  • Chrome Tabs API - Page interaction and text replacement

Browser Compatibility

  • Chrome 88+ (Manifest V3 support)
  • Edge 88+ (Chromium-based)
  • Other Chromium browsers with Manifest V3 support

Privacy & Security

Data Handling

  • Text Processing: Sent to Google Gemini API for transformation only
  • No Data Storage: Text is not stored on external servers
  • Local Storage: API keys and history stored locally in browser
  • No Tracking: No analytics or user tracking

Permissions Used

  • activeTab - Access current webpage for text selection
  • storage - Save settings and history locally
  • scripting - Inject content script for text selection

Security Features

  • API key validation and secure storage
  • Input sanitization and length limits
  • Content Security Policy protection
  • XSS prevention measures

Troubleshooting

Common Issues

"Our provided API quota is exhausted!"

  • This means our shared API key has reached its daily limit
  • Simply get your own FREE Google Gemini API key
  • Visit Google AI Studio and follow the setup
  • Your personal key gives you 1,500 free requests per day!

"Please configure your API key first"

  • This appears if both our provided key and your personal key are unavailable
  • Get a free API key from Google AI Studio
  • Paste it in settings (gear icon) and click "Save"

About

A powerful Chrome extension that transforms text into different tones using AI. Select text on any webpage or paste it into the extension popup to change its tone to professional, happy, excited, and more!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published