Add automatic Turkish translation tooltip on text selection#1
Open
mesutcakir wants to merge 3 commits into
Open
Add automatic Turkish translation tooltip on text selection#1mesutcakir wants to merge 3 commits into
mesutcakir wants to merge 3 commits into
Conversation
mesutcakir
commented
Mar 8, 2026
- Added tooltip that appears when text is selected on any webpage
- Automatically translates selected text to Turkish using LibreTranslate API
- Shows 'Çevriliyor...' loading message while translating
- Tooltip positioned above cursor with smooth styling
- Auto-hides on click
- Added Turkish locale support (_locales/tr and locales/tr)
- Limits translation to selections under 500 characters for performance
- Added tooltip that appears when text is selected on any webpage - Automatically translates selected text to Turkish using LibreTranslate API - Shows 'Çevriliyor...' loading message while translating - Tooltip positioned above cursor with smooth styling - Auto-hides on click - Added Turkish locale support (_locales/tr and locales/tr) - Limits translation to selections under 500 characters for performance
Features: - Redesigned settings page with modern, compact UI - Added tooltip customization options (font size, width, opacity, duration) - Live preview of tooltip settings - Turkish language support in settings - Improved tooltip positioning in iframes - Dynamic settings loading without page refresh - Fixed API URL configuration (now uses settings correctly) - Target language selection from settings - Better error handling and logging Improvements: - Tooltip stays visible for configurable duration (3-30 seconds) - Tooltip doesn't disappear during translation - Better boundary detection for tooltip positioning - Cleaner, more intuitive settings interface - Removed unnecessary textarea customization options - Added emoji icons for better visual organization Bug Fixes: - Fixed iframe positioning issues - Fixed tooltip disappearing too quickly - Fixed API URL not being read from settings - Fixed translation language not respecting settings
Features: - Translate select options when hovering with mouse - Translate options when navigating with keyboard (arrow keys) - Translate on click/selection - Show translation tooltip on the right side of select element - Support for iframes (all_frames: true in manifest) - Automatic detection of dynamically added select elements Implementation: - Focus/blur tracking for select elements - Keyboard event listeners (ArrowUp/ArrowDown) - Mouse hover detection using elementFromPoint - Click event handling with delayed translation - MutationObserver for dynamic content - Debouncing to prevent excessive API calls User Experience: - Loading indicator (⏳) while translating - Tooltip appears on the right side of select - Auto-hide after 3 seconds on click - Console logging for debugging - Works with both mouse and keyboard navigation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.