Fancy Quote - Chrome Extension
A powerful Chrome extension for clipping and managing text selections from web pages with multilingual support.
πΈ Screenshots
π Features
- Text Clipping: Select and save text from any webpage with a simple right-click
- Multilingual Support: Available in English, Vietnamese, and Czech languages
- Smart Organization: Clips are automatically sorted by timestamp with source URL tracking
- Popup Interface: Easy-to-use popup showing all your saved clips
- Export Functionality: Export your clips to JSON format for backup or sharing
- Context Menu Integration: Quick access through right-click context menu
- Instant Copy: One-click copying of saved text clips
- Individual Management: Delete specific clips or clear all at once
π Installation
From Source
-
Clone this repository:
git clone https://github.com/curvecode/fancyquote_chrome_ext.git cd fancyquote_chrome_ext -
Install dependencies:
-
Build the extension:
-
Load the extension in Chrome:
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked" and select the
distfolder
- Open Chrome and navigate to
From Chrome Web Store
Coming soon - Extension will be available on Chrome Web Store
π How to Use
Basic Text Clipping
- Select text on any webpage
- Right-click and choose "Add to Fancy Quote" from the context menu
- Your text is automatically saved with the source URL and timestamp
Managing Your Clips
- Click the extension icon in the Chrome toolbar
- View all clips in the popup interface
- Copy clips using the π button
- Delete individual clips using the ποΈ button
- Export all clips to JSON using the Export button
- Clear all clips using the Clear All button
Language Settings
- Open the extension popup
- Use the language dropdown to switch between:
- English (en)
- TiαΊΏng Viα»t (vi)
- ΔeΕ‘tina (cs)
- The interface and context menu will update automatically
π οΈ Technical Details
Built With
- TypeScript - Type-safe development
- Vite - Fast build tool and development server
- Chrome Extension Manifest V3 - Latest extension platform
- Chrome APIs: Storage, Context Menus, Notifications, Scripting
Project Structure
fancyquote_chrome_ext/
βββ background.ts # Service worker (background script)
βββ content.ts # Content script for text selection
βββ popup.ts # Popup interface logic
βββ popup.html # Popup interface HTML
βββ manifest.json # Extension configuration
βββ _locales/ # Internationalization files
β βββ en/messages.json # English translations
β βββ vi/messages.json # Vietnamese translations
β βββ cs/messages.json # Czech translations
βββ icons/ # Extension icons
βββ dist/ # Built extension (after npm run build)
Key Components
Background Service Worker
- Manages context menu creation and updates
- Handles storage operations and notifications
- Listens for language changes and updates UI accordingly
Content Script
- Minimal footprint script for text selection detection
- Communicates with background script for clip storage
Popup Interface
- Clean, responsive UI for clip management
- Real-time language switching
- Export functionality and clip organization
π Internationalization
The extension supports multiple languages through Chrome's i18n API:
- English (en): Default language
- Vietnamese (vi): Full Vietnamese translation
- Czech (cs): Complete Czech localization
All UI elements, context menus, and notifications are translated, providing a native experience for users in their preferred language.
π§ Development
Prerequisites
- Node.js 16+
- npm or yarn
Development Setup
# Install dependencies npm install # Start development mode npm run dev # Build for production npm run build # Type checking npm run type-check
Adding New Languages
- Create a new folder in
_locales/with the language code (e.g.,fr/) - Add
messages.jsonwith all required message keys - Update the language selector in
popup.htmlandpopup.ts - Add the language code to the validation arrays in the code
π Permissions
The extension requires the following permissions:
- activeTab: Access to the current tab for text selection
- contextMenus: Create right-click context menu items
- storage: Save and retrieve text clips
- notifications: Show success/error notifications
- scripting: Inject content scripts for text selection
π Known Issues
- Large text selections (>5000 characters) may be truncated in the popup display
- Context menu language updates require a brief moment to sync across tabs
π€ Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Built with modern Chrome Extension Manifest V3
- Inspired by the need for better text management across web browsing
- Icons and UI design follow Chrome's design guidelines
Enjoy clipping and organizing your favorite text snippets with Fancy Quote! π―
