-
-
Notifications
You must be signed in to change notification settings - Fork 819
Pr/testing #3433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sarontebebe7
wants to merge
11
commits into
code-charity:master
Choose a base branch
from
sarontebebe7:pr/testing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Pr/testing #3433
Conversation
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
- Toggle between original and translated video titles on watch pages - Ctrl+click thumbnails to see original titles throughout YouTube - Uses multiple APIs (oEmbed, microformat, meta tags) for reliability - Smart translation detection only shows toggle when needed - Visual indicators and state management per video - Comprehensive test suite with 249 lines of tests - Settings integration in appearance menu (default: enabled) Fixes issues with translated titles obscuring original content.
…rontebebe7/youtube into feature/original-title-toggle
- Separate enable/disable functions for each feature - Auto-initialization based on storage values - User cohort detection (multilingual, countries, subtitle users) - Feature eligibility checking for gradual rollout - Debug logging system (toggleable) - Smart storage listener with auto enable/disable
- Add page detection to identify current YouTube page (home, watch, feed, etc.) - Implement loadFeatureModule() for dynamic script injection - Add loadAndEnableFeature() to check page eligibility before loading - Track loaded modules to prevent duplicate loads - Update storage listener to use lazy loading - Refactor init.js to load only enabled features dynamically - Remove static feature imports from manifest content_scripts - Add feature modules to web_accessible_resources for dynamic loading - Features now load on-demand based on user settings and current page
- Add comprehensive status report comparing implementation vs author requirements - Remove unnecessary typeof checks in init.js (as per author's comment) - Trust lazy loading to handle feature availability - Document remaining work: sidebar.js refactoring needed
- Add 27 new test methods for lazy loading features - Test detectUserCohort with various user scenarios - Test isFeatureEligibleForUser with cohorts and rollout - Test getUserHash for consistent A/B testing - Test getCurrentPage for URL path detection - Test loadAndEnableFeature with module loading - Use test doubles (mocks, stubs, fakes) extensively - Doubled total test count from 25 to 52 tests - 39 tests passing (75% pass rate) Coverage remains low (0.39%) due to browser-dependent code Tests focus on testable business logic in core.js
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.
Unit tests for lazy loading system