Greasy Fork

来自缓存

Greasy Fork is available in English.

YouTube 播放 Plox

自动保存并恢复 YouTube 视频的播放进度,无需登录。

这些是此脚本变更过代码的版本。 显示所有版本。

  • v0.0.9-15 2026-05-05

    0.0.9-15

    0.0.9-15

    Fixed

    • old-youtube-player: Implemented a fallback style if a user has userscripts that remove Delhi classes, restoring the pill button group visibility in the progress bar. https://github.com/Alplox/Youtube-Playback-Plox/issues/46#issuecomment-4366541757
    • Observer Duplication: Removed duplicate MutationObserver from waitForWatchPlayerReactive function that was causing race conditions and duplicate video processing. The function now uses only polling and timeout mechanisms, while DOM mutation detection is handled exclusively by the main observer system in initObservers.
    • Infinite Recursion in setLanguage: Fixed "too much recursion" error by implementing fallback to direct storage access when Settings.get() causes recursion during initialization.
  • v0.0.9-14 2026-05-03

    0.0.9-14

    0.0.9-14

    Fixed

    • Watch Player Detection - Reactive Observer: Replaced polling-based detection with a hybrid MutationObserver approach for Watch player bootstrap. When #movie_player is not found on a watch page, the script now uses a reactive MutationObserver to detect the player immediately when it appears, plus a 4-second safety timeout. #46

    Changed

    • YouTube Helper API: Re-added support for YouTube Helper API, using a more unified method to detect the presence of the API. (The API may spit out some minor errors, but they are not a problem as they don't break the script)

    Added

    • Spotify Quick Access: Added a new button to open/search for a saved video in Spotify. (This was a personal userscript that I decided to share here so I can deprecate it.)
  • v0.0.9-13 2026-05-03

    debugging

    test: removed youtube helper api

    tweak: reinforce seek

    fix: resolve initialization loop

    fix: logs using wrong semantics

    refactor: implement detailed ineligibility reasons in logs for better troubleshooting

    Update youtube-playback-plox.user.js

    Update youtube-playback-plox.user.js

    test: change updateurl to current branch

    chore: bump youtube helper api to 0.11.0

    refactor: remove Youtube Helper API

    fix: Shorts ad detection failure caused by 250ms cache window

    tweak: added verification instanceof Element to prevent DOM errors

    Update youtube-playback-plox.user.js

    feat: added pre-check before scheduling github backup intervals

    Merge pull request #45 from Alplox/playerObject-0.0.9-13-beta

    0.0.9-13

    Fixed

    • instanceof Element: Added verification instanceof Element to prevent DOM errors
    • Shorts Ad Detection Fix: Fixed a bug where ads in Shorts were not being detected and were saved as regular shorts. The root cause was a 250ms cache in AdDetector.isNodeWithinAdContainer that stored the result of the initial check (which only verified in-feed ad containers). When the ad-created class appeared dynamically on the Shorts player AFTER the first check but WITHIN the 250ms cache window, subsequent calls would return the cached false result, allowing ads to bypass detection. Fixed by moving all player class checks (ad-created, ad-showing, ad-interrupting) to execute BEFORE the cache lookup, ensuring these dynamic classes are always checked fresh without cache interference.
    • GitHub Token Validation: Added token validation for GitHub backups before saving. Invalid tokens are now rejected.
    • Gist ID preservation: Fixed a issue where script was using githubSettings.gistId instead of githubSettings.gist.id completly ignoring Gist ID enter by user. #43
    • Watch Observer Hardening: Refactored the Watch observer initialization to use DOMHelpers.getWatchPlayer(). This ensures the observer only targets the legitimate main player and explicitly excludes #movie_player instances located within a miniplayer, preventing redundant triggers.
    • UI Robustness: Added fallback selectors (.ytp-left-controls) for the progress bar.
    • Resume Robustness: Implemented post-seek persistence verification (800ms) and anti-overwrite protection to prevent YouTube's native resume from overwriting YPP history for users logged in into their Youtube accounts.

    Changed

    • Logging System: logLog now uses console.log instead of console.debug for better visibility in environments where debug output is filtered. Added grouping methods (logGroup, logGroupEnd) to improve log organization in the console.
    • GitHub Backup Optimization: Added pre-check before scheduling backup intervals to avoid unnecessary 5-minute polling when autoBackup is disabled or no valid token is configured. The script now verifies autoBackup + token presence for both Gist and Repository before creating any intervals.
    • Youtube Helper API: Removed library Youtube-Helper-API upon facing errors Error in _handlePlayerUpdate: TypeError: appState.player.playerObject.querySelector is not a function that were causing the script to break. Reported findings to developer. #42
  • v0.0.9-12 2026-05-02

    fix: prevent bootstrap session teardown on initial page load in handleNavigation

  • v0.0.9-11 2026-05-01

    chore: forgot to change the '@requiere' url

  • v0.0.9-10 2026-04-24

    feat: Request persistent storage for IndexedDB

  • v0.0.9-9 2026-04-23

    feat: granular alert system & UI enhancements

    chore: bump YouTube Helper API to version 0.10.0

    change: replaced <select> for custom dropdowns to support SVG

    tweak: unify footer import/export into two dropdown action buttons with JSON and FreeTube options

    refactor: Replace loose equality operators (==, !=) with strict equality operators (===, !==)

    add: add missing translations

    refactor: CSS system variables for better contrasts

    fix: implement auto-preset detection when range inputs match a predefined filter

    changed: replaced loading spinner with skeletons cards, add more animations

    fix: correct video completion registration for videos with fixed start time

    feat: Implement asynchronous thumbnail skeletons in the video list for improved rendering performance

    fix: regenerate completionHistory daily from events when daily is empty

    Update youtube-playback-plox.user.js

    fix: clamp completed/near-end shorts to 100% and 0s remaining

    fix: disable playlist creation action buttons when no videos selected

    Merge pull request #33 from Alplox/UI-Tweaks-beta-0.0.9-9

    0.0.9-9

    Fixed

    • Completion History Daily Regeneration: Fixed a bug where the daily object in completionHistory remained empty after migration from legacy array format. Added logic in normalizeVideoData to regenerate daily counts from existing events when daily is empty but events are present.
    • Robust Loop Tracking: Fixed a bug where automated replays (especially in auto-looping Shorts) failed to accurately record multiple views in the same session due to narrow time reset thresholds. Implementing relative delta tracking and hybrid finish calculations now ensures seamless loop counting for shorts and normal videos of any duration.
    • Completion History Memory Safety: Hardened the video data processing architecture by enforcing immutable array cloning for completionHistory across all save operations (preventing accidental context mutations) and introducing a strict 50-entry timeline cap with 2-second timestamp deduplication in normalizeVideoData to restrict unbounded IndexedDB storage growth.
    • Fixed Time Completion: Resolved a bug where video completion was not registered in the watch history when a video had a fixed start time. Additionally, fixed an issue where clicking "Replay" would reset the video to 0:00 instead of the fixed start time; the script now correctly detects replays and re-applies the saved fixed position. #32
    • Fixed Time ReferenceError: Fixed a ReferenceError ('alertStyles' is not defined) in syncFixedTimeUI that occurred when assigning a new fixed start time, migrating the alert style purely to dynamic configurations.
    • Range Input Synchronization: Improved the behavior of Views and Percentage range filters.
      • Sanitization: Fixed a bug where non-numeric characters (like "e", ".", or "-") were allowed by switching inputs to type="text" with inputmode="numeric".
      • Auto-Preset Detection: Added real-time synchronization so that if manual inputs match a standard preset (e.g., 0-0 for All, or 1M+), the dropdown automatically selects that preset instead of remaining as "Custom".
      • Dynamic Icons: The percentage range filter now updates its icon (0%, 33%, 66%, 100%) in real-time based on the minimum value selected, consistent with the video list design.
    • Seek Message Persistence: Fixed an issue where the "Resumed at X:XX" (seek) message would disappear even if the video remained paused. Now, the message persists while the video is paused and only clears after playback begins.
    • Redundant Cleanup Loop: Fixed an issue where loadTranslations would re-add the translation cache to localStorage on every load, causing cleanupNonVideoData to repeatedly perform migration logic and logs.
    • Management Mode Selection Reset: Fixed an issue where the selected videos count and button states remained active after deleting selected videos in Management Mode. Now calls updateManagementFooterState() after clearing selection to properly reset the UI state.
    • Progress Color at 0%: Fixed an issue where getProgressColor() returned an object instead of an RGB string when percent is 0, causing the inline style to render as color: [object Object]. Now correctly returns rgb(221, 68, 68) for 0% progress.
    • Deprecated unescape Replacement: Replaced deprecated unescape() function with modern TextEncoder for UTF-8 to base64 encoding in GitHub repository backup, eliminating TypeScript deprecation warnings.
    • CSP Violation in Settings Modal: Fixed Content-Security-Policy violation when opening the Settings modal by removing inline oninput handler from interval inputs and replacing with programmatic addEventListener calls. Also added validation to enforce minimum value of 1 for interval inputs.
    • Code Style Improvements: Replaced loose equality operators (==, !=) with strict equality operators (===, !==) in 14 null comparisons throughout the codebase to follow ES2025 best practices.
    • Dropdown Overlap: Fixed a bug where multiple custom dropdowns (Sort, Filter by type, etc.) in the advanced filters panel could remain open simultaneously. Removed e.stopPropagation() from triggers to allow the global outside-click listener to correctly close other open dropdowns when a new one is clicked.
    • Improved Error Logging: Added logError calls to critical silent catch blocks in loadTranslations, getPlaylistName, and cleanupNonVideoData to improve troubleshooting for failed network requests and corrupted metadata migration.
    • Theme Detection: Added applyTheme() function to set the attribute [data-theme="dark"] during initialization and observeThemeChanges() with MutationObserver to automatically update when YouTube toggles between light/dark modes.

    Added

    • Playlist Clear Selection: Added a "Clear selection" button in Playlist Creation Mode.
    • ISO 3166: Added ISO_3166 to LANGUAGE_FLAGS values. This eliminates the use of emojis and increases compatibility with browsers that did not support them before.
    • SVG Icon Dropdowns: Replaced natives <select> elements in the Saved Videos modal (filter by type and sort) with a custom div-based dropdown component (createCustomDropdown) and in the Settings modal for the language. This allows displaying SVG icons next to each option, something the browser's native <option> element does not support.
    • YouTube Helper API Integration: Added a persistent listener for yt-helper-api-ready to handle "silent" video updates in Single Page Application (SPA) mode (e.g. Playlists and Shorts). This ensures that progress is correctly saved and resumed even when YouTube navigates between videos without a full page reload or a visible player change.
    • Hide Timestamp Option: Added a specific toggle in the 'Notifications' settings block to completely hide timestamps ([12:34]) from video alerts, giving users more flexibility for a cleaner UI even if keeping text or icon displays.
    • Changelog.md: Added a changelog to keep track of the changes made to the script.
    • Granular Alert System: Replaced the previous fixed alert styles with a granular system. Users can now independently toggle icons, messages, and timestamps for video alerts.
    • Live Alert Preview: Added a real-time preview in the Settings modal that shows exactly how alerts will look based on the selected configuration.
    • History Button Toggle: Added a new setting to show or hide the "Saved Videos" history button in the playback bar.
    • Button System Refactor: Refactored the button CSS system to use CSS custom properties (--btn-bg, --btn-bg-hover, --btn-bg-active, --btn-color) for each variant.
    • Playlist Color Refactor: Refactored generatePlaylistColor() and generatePlaylistBorderColor() to use CSS variables from the button system (--ypp-primary, --ypp-info, --ypp-success, --ypp-warning) instead of HSL color generation. This ensures AAA contrast compliance with the new button and text color system. Background colors use color-mix() with 15% opacity for a soft appearance, while borders use full color for visibility.

    Changed

    • Refactor: Migrate completionHistory to structured CQRS object (events/daily/total) enabling unbounded analytical metrics and O(1) sorting performance, decoupled from strict normalization processes.
    • Asynchronous Thumbnail Skeletons: Improved the Saved Videos modal UX by rendering video list items instantly with a skeleton layout for the thumbnail while the valid image URL loads asynchronously, preventing layout blocks and empty gaps during fast scrolling.
    • Motion & Spring UI: Implemented cascading staggered entry animations for modal windows and applied organic spring physics interpolation (cubic-bezier) to Toast notifications and expanding filter panels for a fluid feel.
    • Skeleton Loaders: Replaced loading spinner with fully composed Skeleton UI cards reflecting layout structures.
    • Alert Logic Refactor: Completely refactored the internal alert construction logic to support dynamic combinations of icon, text, and time components.
    • Settings UI Optimization: Modernized the Notifications section of the settings modal for better clarity and usability.
    • Metadata Synchronization: Improved metadata extraction by leveraging the latest API refiring capabilities for better accuracy during seamless transitions.
    • Import Limit Increase: Increased the maximum file size for FreeTube imports from 10MB to 50MB to support larger watch histories.
    • Language Management Optimization: Refactored setLanguage to avoid redundant storage writes and improved the fallback detection logic using ES2025 features.
    • Translation System Overhaul: Replaced the expensive pre-init deep merging of translations with a dynamic "waterfall" fallback in the t() function. Refactored loadTranslations to avoid redundant caching of local constants, ensuring the script only uses external data when truly available.
    • Legacy Storage Removal: Eliminated isOldFormat logic and playlistKey dependencies from video action handlers. The script now exclusively uses the modern standalone IndexedDB format for all video entries, simplifying the codebase and improving reliability.
    • Import/Export Footer UX: Unified the Saved Videos modal footer into two primary buttons (Import and Export) and added compact upward dropdown menus to choose JSON or FreeTube format on click.
    • Management Mode UX: Moved Import/Export actions into Management Mode and unified export actions for both "All" and "Selected" under the same dropdown design to reduce redundancy.
    • Management Footer Visual Hierarchy: Reorganized management actions into grouped sections (selection/data/destructive/session), applied semantic button variants, and added dynamic disabled/count states for selected-only actions to improve clarity and prevent accidental clicks.
    • Hidden Selection Recovery: Fixed an edge case where selected videos could become hidden after applying filters with no clear way to deselect them. The management footer now indicates hidden selected count and allows clearing all selections directly from the selection toggle flow.
    • Dedicated Selection Reset: Added a dedicated Clear selection action in Management Mode and new fallback-only translation keys to explicitly indicate hidden selected items in current results.
    • Advanced Filters UI Redesign: Compacted the advanced filters panel from a 2-row layout into a single unified 4-column grid. Sort, Type, Views, and Percent filters now share the same row. Each filter column shows a chip-label (icon + name) above its control for clarity. Range filters (Views/Percent) are now fully inline: preset dropdown and Min–Max inputs share a single horizontal row. Removed the old external text labels in favor of consistent chip-labels across all filter columns.

    Removed

    • Legacy Settings: Removed the obsolete alertStyle and hideTimestamp settings in favor of the new granular flags.
  • v0.0.9-8 2026-04-17

    fix: Add fallback to GitHub settings to prevent TypeError when gist or repo objects are missing

    0.0.9-8

    Fixed

    • GitHub Settings Undefined: Fixed a TypeError ("can't access property 'lastSync', s is undefined") that occurred during Settings UI rendering when a legacy or partial GitHub Backup configuration lacked gist or repo properties. Now it uses a secure fallback to CONFIG.defaultGithubSettings[type]. #27
  • v0.0.9-7 2026-04-16

    feat: new manage videos mode, more filters, protect video option

    0.0.9-7

    Added

    • Pre-Migration JSON Backup: Added an automated prompt that recommends downloading a JSON backup of saved videos before executing any data structure migrations on IndexedDB. #22
    • Protected Videos Feature: Added a "Protect" option to saved videos to prevent accidental deletion. Protected videos cannot be removed through individual, bulk, or "Clear All" actions until manually unprotected. #17
    • Visual Protection Indicators: Protected videos are highlighted in the saved videos list with a golden border and a locked icon for easy identification. Deletion logic automatically skips protected items and provides feedback on how many items were preserved.
    • Filter Redesign: Implemented a collapsible "Advanced Filters" section in the Saved Videos modal to maximize vertical space.
    • Active Filter Indicator: Added a dynamic badge to the "Advanced Filters" toggle that displays the number of active hidden filters, providing clear feedback when results are being narrowed.
    • Categorized Sort UI: Reorganized the sorting dropdown into logical groups using <optgroup> for better usability.
    • Advanced Bidirectional Sorting: Implemented 14 sorting options including Date, Title, Author, Duration, Watch Count (Favorites), YouTube Views, and Watch Progress, all supporting both ascending and descending orders.
    • Hybrid Filtering: Combined preset dropdowns (1M+, 50%+, etc.) with custom Min/Max range inputs for Views and Watch Percentage.
    • Responsive Layout Optimization: Refactored the filter grid to use auto-fit and minmax for better adaptation across various screen sizes.
    • Independent Management Mode: A new "Manage Videos" toggle enables selection for bulk removal/export.
    • Completed Filter: Added a new "Completed at least once" filter to the Saved Videos modal.
    • Data Preservation during Import: Updated normalizeVideoData to ensure the isProtected flag is preserved when importing JSON backups.

    Fixed

    • Storage Quota Error Propagation: Fixed a bug where IndexedDBAdapter.enqueue() silently swallowed all IndexedDB errors (including QuotaExceededError) by calling .catch() without re-throwing. This caused quota failures to never reach Storage.set, so the storage_full alert was never triggered. The fix makes enqueue re-throw errors so they bubble correctly to callers. Additionally, broadened quota detection in Storage.set to also check err.code === 22 (the QUOTA_EXCEEDED_ERR numeric DOMException code) and the error message string, for cross-browser compatibility.
    • Smart Filter Presets: Added a "Custom" (Personalizado) state to range dropdowns that activates when manual values are entered. Also added specific tooltips (Min views, Max %, etc.) to input fields.
    • Virtual Scroller: When deleting a video, the virtual scroller now preserves its state, so it doesn’t automatically scroll back to the top. #26

    Changed

    • Filter Persistence Architecture: Replaced redundant saveFilters and getSavedFilters functions with a consolidated Filters object. This follows the same robust pattern as the Settings object, ensuring consistent error handling and cross-tab synchronization.
    • Completion History Migration (0.0.9-6 → 0.0.9-7): normalizeVideoData now automatically backfills a single completionHistory entry (using timeWatched as the legacy timestamp) for any video that was already marked as isCompleted = true before history tracking was introduced. This makes the "Watched X times" counter show 1 instead of blank for pre-existing completed videos, and is idempotent (runs only once per record, on the first read/write cycle post-upgrade).
    • Storage Cleanup & Migration Consolidation: Simplified the script's initialization flow. The redundant migrateToFreeTubeFormat function has been eliminated and its structural normalization logic (desanitizing playlists, enforcing new schema) is now integrated into cleanupNonVideoData.
    • Deep Orphan Sweeping & GM_setValue Sanitation: Expanded the storage cleanup routine to perform a deep sweep of localStorage and GM_setValue. It now securely migrates legacy configuration flags and gracefully rescues any orphaned video entries left behind by older versions, ensuring a completely clean and unified IndexedDB exclusively dedicated to video data.
    • Performance: Cached isShortsPreview in videoEl.dataset to avoid repeated querySelector calls on each save tick.
  • v0.0.9-6 2026-04-12

    feat: add watched count indicator, error logging section, UI upgrades and fixes

    0.0.9-6

    Added

    • Completion History Tracking: Videos now record a timestamped history of every time they are watched to completion. This allows tracking repeat views and seeing exactly when a video was finished.
    • Completion Session Toggle: Added a "Count only once per session" toggle in Settings. If enabled, auto-looping or re-watching a video without navigating away will only count as a single completion, preventing "noise" in history for unattended PCs.
    • Watched Count Indicator: Added a "Watched X times" badge to video entries in the saved list. Hovering over the badge shows the full history of completion dates, now truncated to the 10 most recent entries with a (+N more) indicator for better UI performance.
    • Support & Error Logs UI: Added a dedicated sub-section inside the Settings modal to display an ongoing registry of internal script errors dynamically intercepted from MyScriptLogger.error. Facilitates robust bug reporting on GitHub Issues by including a "Copy Logs" button that automatically parses the errors with environment data (User Agent, URL, Version) and leverages the native showFloatingToast for immediate click feedback.
    • Asynchronous Thumbnail Validation: Implemented a pre-rendering validation system for video thumbnails in the Saved Videos modal. It sequentially checks for the best quality available (WebP MaxRes, JPG MaxRes, HQ720, HQ) and filters out YouTube's low-quality placeholders before rendering, utilizing an in-memory cache to ensure zero performance impact during scrolling.
    • CSS Cleanup: Added vendor prefixes and removed redundant code.
    • Updated video existence indicator behavior: instead of changing the icon, it now changes color on hover when the video exists in the database. (#23)

    Fixed

    • Signature Mismatch: Fixed a ReferenceError in saveLivestream and aligned all save function signatures to ensure consistent parameter passing from the central controller.
    • Completion Tooltip Overflow: Fixed an issue where the completion history tooltip could overflow the screen for frequently watched videos by implementing a truncation system (limit to 10 entries + overflow count).
    • Filter Overflow Fix: Added min-width: 0 to video filter grid cells and selectors to prevent layout horizontal overflow on narrow windows.
    • Manual Save UI Accuracy & Performance: Fixed a bug where the manual save button would erroneously appear on disabled video types (e.g., when the user has saveLiveStreams set to false, but manual save mode on). The button's visibility is now dynamically toggled purely via CSS using a toggleManualSaveVisibility helper. (#24)
    • Manual Save UI Flicker: Eliminated UI layout shifting (flickering) by initializing the manual save button in a hidden state (ypp-d-none) by default, and removed recurring overhead from restoreDisplayButtons that was attempting to incorrectly force visibility every second.
    • Manual Save Notification: Fixed a bug where the manual save notification was immediately cleared if the user pressed the manual save button while the video was paused.
    • Navigation UI Persistence: Resolved an issue where "Always start from here" (Fixed Time) messages and other notification artifacts would persist when navigating between videos in Single Page Application (SPA) mode, particularly affecting users in Manual Save Mode. Implemented a proactive clearAllPlaybackMessages reset at the start of every new video session.
    • Race Condition Fix: Resolved a critical "zombie" resume bug where seek operations from previous video sessions were leaking into new video loads during history navigation.
    • Real-time Fixed-Time Updates: Refactored syncFixedTimeUI and modal logic to instantly update the playback bar message and hide/show buttons when a fixed time is assigned from the settings modal.
    • Backup ReferenceError: Fixed a ReferenceError in performRemoteBackup where backupType was used instead of the local type parameter.
    • Last Sync UI: Fixed Last Sync always showing "unknown" after backup. Settings are now re-read from GM storage after a successful backup so the UI reflects the real updated timestamp.
    • Token Not Cleared from UI: Fixed token input not being cleared from the UI modal after auto-delete in repo mode. The selector now uses the type-specific input name (gist_token / repo_token), as opposed to the non-existent githubToken.

    Changed

    • New History Icon: Replaced the previous folder-style icon with a more intuitive clockRotateLeft (history) icon for the saved videos list across all playback bar displays.
    • Alert Settings Simplification: Merged the redundant showNotifications checkbox and alertStyle dropdown into a single unified setting. The alertStyle: 'Hidden' option now handles all notification disabling, streamlining the Settings Modal and reducing configuration complexity.
    • Improved Settings Modal Layout: Refactored the internal rendering logic of the Settings Modal into modular sub-sections (General, Manual/Automatic Saving, Notifications) for better maintainability and visual organization.
  • v0.0.9-5 2026-04-09

    feat: Implement GitHub backup system (gist/repo) and a manual save mode

    0.0.9-5

    Added

    • Manual save option: Users can now toggle between automatic periodic saving of progress (enabled by default) and manual saving via a new save button. (#20)
    • Navigation blocking on Previews: Prevented YouTube from navigating to the video page when clicking on the custom buttons (modal or manual save) placed over video previews. Added preventDefault() to button click handlers and a dedicated click listener to the preview UI container to ensure clicks within our UI area are captured and not bubbled up to the underlying video link.
    • GitHub Backup System: Automated and manual backup of video progress and metadata to a private GitHub Gist or Private Repository, stored independently via githubSettings. Added informative UI messages regarding Gist privacy and the inherent behavior of secret Gists.
    • Enhanced Privacy & Repository Support: Added support for absolute privacy using private GitHub repositories. Implemented specialized logic to verify repository privacy before any data transfer.
    • Token Auto-Destruction: Added a security feature to automatically delete GitHub Personal Access Tokens from local storage immediately after a manual backup, minimizing credential exposure.
    • Backup Parity & Metadata: Backup files now include internal metadata (script version, timestamp, total entries) within an internal __metadata__ key, maintaining parity with manual JSON exports.
    • Embedded Help & Cleanup Guide: Expanded the integrated help guide with a step-by-step backup cleanup guide (Gist/Repo deletion) and updated security warnings.
    • Security & Privacy Safeguards: Implemented password style inputs for IDs and tokens, added UI warnings against sharing credentials, and truncated IDs in console logs for privacy.
    • UI Refinement: Optimized the settings modal with tab-specific help guides and security warnings that dynamically update based on the active configuration tab.

    Fixed

    • Playlist Detection on Navigation: Fixed a bug where the playlist ID was occasionally lost (saved as null) during YouTube's internal navigation ("change src" events). Added a URL-based fallback to getCascadedVideoInfo to ensure the playlist ID is correctly extracted from the address bar if the player state is temporarily unavailable.

    Changed

    • Update script images: New images for README files to ilustrate current version.
    • Manual Save Mode Logic: Refactored save functions to honor manualSaveMode behavior across all contexts, allowing the script to skip automatic updates when manual save is active.
    • Improved Export & Sync Logic: Refactored the core data logic into a reusable getSyncData helper to support both local file export and remote synchronization.
    • DOM Helpers & Performance: Refactored miniplayer queries and general DOM helpers for better reliability and performance.
    • Buttons opacity: Refactored style for button pill inserted in the progress bar for better contrast and segregation of actions. (#23)
  • v0.0.9-4 2026-04-04

    fix: Ensure playback bar button visibility when gradient is disabled

    0.0.9-4

    Fixed

    • Playback Bar Button Visibility: Fixed an issue (#21) where the script's button in the playback bar disappeared when the "ProgressBar Gradient" option was disabled. Essential layout CSS for the modern YouTube UI (Delhi) was incorrectly bundled inside the conditional gradient function; these styles are now correctly separated and always injected.
  • v0.0.9-3 2026-03-31

    fix: detect miniplayer activation via ytd-app attribute

    0.0.9-3

    Added

    • Trusted Types Security Bypass: Implemented a privileged bypass for DOM injection. Shifted from unsafe innerHTML to a combination of getTrustedTypesPolicy() and a fail-safe GM_addElement strategy.

    Fixed

    • Livestream Progress Saving & UI Updates: Fixed a bug in saveStatus where livestreams were skipped entirely failing an !isFinite HTML5 <video> duration check (livestreams have Infinity duration). Replaced the check with isNaN(). Additionally, resolved a logic bug where saveStatus requested UI updates using an artificial videoType of 'live' instead of the layout's actualType ('watch', 'preview', etc.), causing the progress button and toast notifications to silently fail for all livestreams.
    • Miniplayer Session Lifecycle: Fixed an issue where navigating to Shorts or another page (except Watch) would aggressively destroy the active miniplayer session, forcing it to reload from storage and blindly apply a seek that interrupted playback. The miniplayer's session is now safely preserved across non-destructive navigation events.
    • Miniplayer Button Initialization: Fixed a bug where transitioning from the main Watch player to the Miniplayer would fail to display the script's UI controls. Refactored DOMHelpers.getMiniplayerActive to use modern .matches() and hasAttribute CSS selections, ensuring the miniplayer is correctly detected and enqueued during the navigation bootstrap phase.
    • Miniplayer Activation Detection: Fixed a bug where isMiniplayerActive was never updated when the miniplayer activated, because the MutationObserver was incorrectly listening for class attribute changes on html/body instead of the miniplayer-is-active attribute on ytd-app. The observer now correctly watches ytd-app, updates the internal flag on activation, and proactively re-enqueues the miniplayer video.
    • Miniplayer Button Container Fallbacks: Restored commented-out container fallback selectors in initMiniplayerTimeDisplay (.ytp-chrome-controls, .ytp-miniplayer-ui, etc.) to ensure the button has a parent to attach to even when .ytp-time-display is absent in certain YouTube layouts.
    • Miniplayer UI Visibility: Resolved a regression where the time display badge failed to appear in the miniplayer. Expanded control container selectors to include .ytp-miniplayer-ui and .ytp-chrome-bottom to ensure compatibility with different YouTube layouts and experiments (including Mixes).
    • Miniplayer Lifecycle Management: Improved MutationObserver and destroyMiniplayerTimeDisplay to ensure clean DOM removal when the miniplayer is closed or transitioned, preventing "ghost" elements and memory leaks.
    • Inline Preview UI Position: Fixed an issue where the script control button on inline previews (video thumbnails on Home) was rendered off-screen or behind the red progress bar. Injected positional CSS rules (.ypp-inline-preview-display) with a safe bottom offset to ensure visibility and clickability during hover states.

    Changed

    • saveStatus & Metadata Optimization: Eliminated redundant videoId assignment and harmonized lengthSeconds to rounded integers (using Math.round) across the entire save pipeline. This ensures 100% compatibility with FreeTube's data format while eliminating redundant storage updates caused by Float/Int precision discrepancies.
  • v0.0.9-2 2026-03-29

    fix: issue where the script would occasionally save a "stale" early timestamp

    0.0.9-2

    Fixed

    • Time Restoration Regression: Fixed an issue where the script would occasionally save a "stale" early timestamp (e.g., 00:09) shortly after successfully resuming a video at a much later point (e.g., 20:51). This was caused by YouTube's player initialization resetting the currentTime during load. Introduced a 3-second grace period and "backwards jump" validation to prevent these premature saves.
  • v0.0.9-1 2026-03-29

    fix: improved toast robustness to handle missing duration argument

    0.0.9-1

    Added

    • Toast Manual Close: Added a manual close (X) button to toasts with the keep: true option, allowing users to dismiss non-auto-removing notifications easily.
    • Unified TRANSLATIONS_EXPECTED_VERSION and SCRIPT_VERSION in the script logic.

    Fixed

    • Export & Clear Validation: Added checks to exportDataToFile, exportToFreeTube, and clearAllData to prevent operations on empty data. A warning toast is now shown if no relevant videos are found.
    • Toast Robustness: Improved showFloatingToast to handle cases where the options object is passed as the second argument, preventing display failures when duration is omitted.
    • Playlist Selection State Reset: Resolved a bug where the video selection UI persisted when closing and reopening the modal during playlist creation mode. Now, isSelectionMode and selectedVideos are properly reset when the modal is closed.
  • v0.0.9 2026-03-29

    perf: throttle timeupdate handler to 250ms restricting expensive DOM queries on main thread

    perf: optimize DOM querying with smart video caching and selector improvements

    -Implement smart caching for querySelectorAll('video') to reduce DOM scans

    • Optimize querySelector in VideoTypeHandler by combining multiple queries

    • Reduce cleanup timeouts from 1000ms to 200ms for faster memory release

    • Add early exit in export to avoid unnecessary processing

    perf: Reduce polling interval from 1000ms to 500ms for improved responsiveness

    -Optimize storage usage interval from 30s to 60s to reduce API calls

    perf: Implement pre-computed color cache and optimized interpolation in getProgressColor()

    • Add compiled regex cache and pre-computed multipliers in formatViewsFromLabel()

    • Implement temporal cache with 50ms TTL for consecutive timestamp calls

    perf: deduplicate getYouTubePageType, closest, and URLSearchParams calls in hot paths

    fix: Block homepage auto-play ads from being saved as regular videos

    Prioritize YouTube API sources (YTHelper or ytInitialPlayerResponse) over DOM parsing to avoid "N/A" values caused by delayed page rendering.

    refactor: centralize ad selectors and cache ad DOM checks

    • Reuse AdSelectors classes in ad monitor checks
    • Added TTL-cached, scoped anchor-in-ad guard for Home/Search/Channel inline preview checks (avoids global document.querySelectorAll scans per tick).
      • Cached Shorts #shorts-player lookup in the ad monitor (reduces repeated DOM queries during rapid checks).

    refactor: centralize player DOM refs with best-effort cache

    perf: Remove unneeded setTimeout and setInterval polling loops to reduce CPU footprint.

    Extended explanation for my own sanity:

    rebindInterval (in processVideo)

    • What it did: It ran every 500ms checking if the active video element had changed or if the URL had changed without triggering a navigation event. If it did, it would clear events and trigger handleNavigation. It would also manually try to attach event listeners to #movie_player or #shorts-player.
    • Why it was remove: YouTube's navigation events (yt-navigate-finish, yt-helper-api-ready) are extremely reliable now, especially with our recent fixes to the helper. We also use a robust timeupdate handler that verifies isValidNewId(newId) natively. Polling every half-second just to check if the video element changed was causing immense CPU overhead, and the event-driven system already catches context changes efficiently.

    progressPollIntervalId (in processVideo) -What it did: It ran every 500ms and manually called updateStatus() using setInterval, acting as a backup in case the timeupdate event failed to fire. It would check Date.now() - lastTick <= 2500 and manually save progress if the video was playing.

    • Why it was remove: The timeupdate event natively fires ~4 times per second whenever a video plays. Because our timeupdate handler (processVideo.handler) is now heavily optimized and correctly throttled to 250ms, it is virtually impossible for a video to be playing without triggering timeupdate. The fallback interval was just running redundant checks in the background doing nothing 99% of the time.

    secondaryProgressPollIntervalId (in processVideo)

    • What it did: It ran every 500ms specifically when watching Shorts. It explicitly polled for the existence of both #movie_player (a background regular video, like the miniplayer) and #shorts-player simultaneously, and tried to manually save progress for both of them at the same time.
    • Why it was remove: The createPlayerContextManager architecture we implemented earlier correctly isolates the timeupdate contexts! The miniplayer and the Shorts player now maintain their own dedicated, isolated timeupdate handlers. We no longer need a global loop manually checking both players; they update themselves independently via their own events.

    checkInterval (in applySeek)

    • What it did: It ran every 200ms after trying to restore a saved timestamp, manually comparing videoEl.currentTime to the target time. If they matched, it manually declared the seek successful.
    • Why it was remove: HTML5 videos natively fire the seeked event the exact moment a seek finishes buffering. We already attach an addEventListener('seeked'). The polling interval was completely redundant and just wasting CPU cycles comparing math while waiting for the native event to fire anyway.

    periodicCheck (in adStateMonitor)

    • What it did: Ran every 15000ms (15s) and simply printed a console.log saying "Monitor activo (watch), anuncio aún presente".
    • Why it was remove: It was purely diagnostic code left over from development.

    refactor: Implement event delegation and template literals for video modal.

    feat: Centralize video context and refactor Settings UI with template literals

    fix: relax playlist matching for miniplayer to maintain association on Shorts page

    Added

    • Created resolveVideoContext() as a pure source of truth for all YouTube DOM inspections, providing a standardized metadata object (type, videoElement, videoId, playerObject, isAd).

    Refactored

    • Centralized Context: Consolidated video context logic across getActiveVideoElement(), applySeek(), and notifySeekOrProgress(). Eliminates "Fallback Hell" and improves cross-page stability.
    • Declarative UI: Refactored showSettingsUI() to use declarative Template Literals and modular rendering helpers (renderLanguageSection, etc.).
    • Simplified getActiveVideoElement() to be a pure wrapper of resolveVideoContext().
    • Implemented unified input reading by name attribute in the Settings UI, removing manual element references.

    • Fixed critical bug where miniplayer progress was lost during Shorts navigation (Coexistence Support).

    • Implemented container-aware progress saving to allow concurrent tracking for multiple video contexts.

    • Improved context detection to correctly identify miniplayer state on Shorts pages.

    • Updated cleanupAll to always preserve the movie player observer if a video is active.

    • Refactored processVideo to use container-isolated handlers, preventing Shorts from removing the miniplayer's progress observer.

    • Fixed timeupdate handler "suicide" bug: the change detection logic now ignores URL changes when the miniplayer coexists with Shorts, preventing the handler from incorrectly unbinding.

    • Enhanced resolveVideoContext and getPlayerDomRefs to detect the miniplayer even while on a Shorts page.

    Security

    • Integrated escapeHTML() and setInnerHTML() in the Settings UI refactor to ensure safe rendering of translated labels and user data.

    refactor: Restructure miniplayer data extraction into MiniplayerDataExtractor module

    tweak: centralize selectors & add miniplayer UI

    BIG CHANGE

    Ref: moving to observers per player

    Update youtube-playback-plox.user.js

    ref: refine observer and added more ad selectors

    perf: optimize video metadata extraction by caching session context to avoid redundant API queries during progress saving

    fix: resolve CSP and Trusted Types violations in Helper API fallback using GM_addElement and TT policies

    ref: getCascadedVideoInfo to extract and consolidate playlistTitle directly within the video object.

    Every saved video now carries its playlist context independently of legacy metadata keys.

    perf: optimize video metadata extraction by caching session context to avoid redundant API queries during progress saving

    fix: precisely detect shorts previews using internal /shorts/ href links fix: ensure playback bar icon is visible by default even if saving is disabled fix: enforce video type settings within saveStatus to respect user preferences fix: Resolve WeakMap TypeError in VideoObserverManager during navigation fix: resolve CSP and Trusted Types violations in Helper API fallback using GM_addElement and TT policies

    feat: implement dedicated saveMiniplayer and dynamic context detection for transitions feat: Add dynamic metadata refresh for viewCount in saveStatus feat: Consolidate playlistTitle in video objects and optimize modal with parallel batching.

    tweak: remove internal 'thumb' property from JSON export

    refactor: remove 'thumb' from storage, build thumbnail URL dynamically in UI refactor: Centralize metadata extraction in getCascadedVideoInfo and simplify observers refactor: Ultra-simplify saving flow by removing all redundant parameters in saveStatus and observers refactor: Align getCascadedVideoInfo with FreeTube schema and fix syntax error refactor: Make savePreview explicit and remove redundant spread/fallbacks refactor: simplify display initialization by removing redundant player fallbacks and DOM queries

    perf: replace DOM querySelector seek detection with direct boolean parameter

    ref: optimize playlist selection UI and reduce DOM queries

    feat: Activate updateProgressBarGradient feature in saveStatus loop

    Refactor: multiple high-frequency functions now use DOMHelpers

    fix: resolved statistics discrepancy in saved videos modal

    fix: storage usage display in video modal

    Resolved a race condition where the used/total space indicator would sometimes fail to appear. Added cache invalidation to ensure the statistics are always refreshed when the video list is rendered.

    fix: reinitialize VideoObserverManager during SPA navigation to ensure players are tracked

    fix: implement async retry loop for playlist extraction to mitigate SPA auto-advance race conditions

    refactor(shorts): replace DOM parsing with youtubei API for accurate video views

    well... DOM parsing still there but only as backup

    docs: optimize JSDoc for getCascadedVideoInfo waterfall strategy

    refactor: Simplified the Waterfall strategy by leveraging the new global getVideoId function, removing redundant ID validations and improving "Self-Healing" resilience during SPA transitions.

    fix: Implemented a "Kill Switch" for polling sessions and integrated a global stopAllSessions() cleanup into the navigation flow. Added a Navigation Token mechanism to prevent race conditions where sessions started just before a page transition could bypass the cleanup.

    fix: Shorts metapanel selection returning null due to invalid selectors

    refactor: debug wording to avoid conflict with variables

    also remove redundant video ID check in saveStatus and duplicated duration extraction in PlaybackController.resume

    perf: Propagate cached video duration to PlaybackController.resume to prevent redundant API polling

    fix: Language Selection Persistence

    fix: Robustize data migration and FreeTube integration (for v0.23.15 Beta)

    refactor: Clean up redundant save logic using non-null spread pattern

    for future me: https://github.com/FreeTubeApp/FreeTube/blob/fa842985/src/renderer/components/DataSettings/DataSettings.vue#L832-L839

    fix: Allow playlist context reset by refining metadata merge filter

    fix: persistent message logic and fixed-time pin indicator

    bump to YouTube Helper API 0.9.7.6

    fix: Prevent TypeError when modal is closed during async data loading

    change: remove debug status, add script version to files during import/export tasks

    feat: add Innertube /next fetch fallback for playlistTitle in getCascadedVideoInfo

    fix: remove orphaned miniplayer time display span on transition back to watch player

    feat: allow auto-closing of persistent toasts when explicit duration is provided

    feat: add shrinking life progress bar to floating toasts

    fix: reset playlist selection state on modal close

    Merge pull request #19 from Alplox/0.0.9

    0.0.9

    Added

    • Playlist Title Fetch Fallback: Added a last-resort fetch via Innertube /next endpoint to retrieve playlistTitle if DOM and cache methods fail. Only triggers on watch/miniplayer contexts when a playlistId is known but title is still missing.
    • Allow auto-closing of persistent toasts when explicit duration is provided and added shrinking life progress bar to floating toasts
    • Integrated escapeHTML() in the Settings UI refactor to ensure safe rendering of translated labels and user data.
    • _id Persistence: Standardized all save paths and the FreeTube export format to preserve the optional _id field. Enforced normalizeVideoType on every write to IndexedDB, preventing format drift and data loss.
    • DOM Helpers Optimization: Created centralized DOM helper functions to eliminate repetitive element lookups throughout the codebase, improving maintainability and consistency.
    • Extended Context Isolation: Added specific helper contexts to eliminate repetitive queries for shorts and miniplayer elements.
    • Centralized AdSelectors: Updated AdSelectors to use centralized constants, eliminating string literals and improving maintainability across ad detection logic.

    Changed

    • Performance Impact: Reduction in CPU usage during active YouTube navigation with improved memory management, enhanced robustness, and better responsiveness.
    • Separated blocking operations from non-critical background tasks.
    • Moved critical UI initialization to the beginning of the initialization sequence.
    • Implemented immediate button creation for watch/embed pages.
    • Added temporal caching for settings to enable early UI initialization.
    • Centralized ad selectors/detector: Consolidated repeated ad-related selectors into a single AdSelectors map with a small TTL-based DOM query cache. This reduces duplicated selector strings, improves maintainability when YouTube changes DOM, and avoids repeated querySelector calls across modules. Included homepage masthead selectors to prevent saving masthead ads.
    • Specialized Observers: Replaced monolithic video processing with context-specific observers for Watch, Shorts, Miniplayer, and Previews. This eliminates cross-player data contamination and prevents blocking playback during background processing.
    • Session Management: Implemented mapping to correlate video elements with their specific processing intervals, enabling precise cleanup and preventing duplicate save loops.
    • Decentralized Navigation: Refactored navigation handlers to trigger the new observer system, ensuring consistent behavior across YouTube's complex navigation events.
    • Improved Resume Reliability: Enhanced the resume function to fetch video duration directly from fast internal YouTube APIs rather than waiting on the slower DOM element. This prevents edge cases where the script stalls unexpectedly on isReady.
    • Enhanced Metadata Extraction: Refactored information cascading to extract and consolidate playlistTitle directly within the video object. Every saved video now carries its playlist context independently of legacy metadata keys.
    • Improved Modal Performance: Refactored the Saved Videos modal to utilize parallel batch loading for all entries, eliminating a sequential storage bottleneck.
    • Video Metadata Caching: Optimized save workflows to fetch complete video metadata only ONCE per session. This prevents redundant YouTube internal API queries every second while tracking playtime progress.
    • CSP & Trusted Types Fix: Refactored the YouTube Helper API fallback mechanism. This resolves the Sink type mismatch error caused by strict CSP policies.
    • In /watch pages, miniplayer detection is now skipped entirely during navigation, eliminating unnecessary overhead.
    • Replaced generic DOM scans on unknown contexts with explicit container lookups, reducing DOM traversal cost.
    • Refactored seek handling to be container-isolated with AbortController cancellation, preventing cross-player seek contamination during coexistence.
    • Configurable Save Intervals: Replaced the hardcoded save interval with the user-configurable settings.
    • Math Operations Optimization: Implemented pre-computed caches to reduce Math and RGB calculations during progress bar updates.
    • Regex Cache Optimization: Added compiled regex cache for view parsing.
    • Performance: Throttled the main time update video event handlers to reduce CPU usage and UI lag.
    • Parallel background tasks: Storage initialization, storage normalization, and data migration now run in parallel using Promise.all().
    • Major initialization improvement: Reduced button initialization delay by optimizing the sequence.
    • Theme Detection Optimization: Replaced simple class-based theme detection with robust integration.
    • DOM Query Optimization: Implemented intelligent caching for video element querying with a strict duration.
    • Timeout Optimization: Reduced cleanup timeouts for quicker memory and resource release.
    • Video Modal Event Delegation: Completely refactored the saved videos modal to use Event Delegation and explicit Template formatting to improve response times for large lists. Supported underlying virtualized rendering for seamless integration.

    Fixed

    • Modal Async Race Condition: Fixed a critical race condition that threw a TypeError (can't access property appendChild, listContainer is null) if the saved videos modal was closed while loading data from storage.
    • Correct meta-key filtering logic to ensure metadata is stripped properly during storage initialization.
    • Data Migration & FreeTube Integration: Resolved legacy fields leaking into IndexedDB causing format inconsistencies.
    • Metadata Extraction (Shorts/Previews): Resolved an issue where view counts were overwritten incorrectly due to cascade priority logic.
    • Playlist Selection State Reset: Resolved a bug where the video selection UI persisted when closing and reopening the modal during playlist creation mode. Now, isSelectionMode and selectedVideos are properly reset when the modal is closed.
    • ProgressBar Gradient: Activated the custom color gradient feature for the playback progress bar.
    • Language Selection Persistence: Resolved an issue where saving the custom language in the settings modal was ignored upon reload.
    • Discrepancy in video statistics: Resolved the "Videos" count and "Renderizados" mismatch.
    • Shorts Panel Detection: Resolved an issue where panels were not detected due to outdated DOM selectors in the Shorts interface.
    • Stale Visit Count on Shorts: Fixed a delay where the view count displayed stale data from the previous Short.
    • Incorrect Ad Detection for Grid Ads: Fixed a logic error where grid-based ads were processed incorrectly.
    • Miniplayer Context Race Condition: Resolved a massive SPA race condition where videos played via miniplayer auto-advance loaded too fast for YouTube APIs to populate IDs.
    • Storage usage display: Resolved a race condition where the used/total space indicator would fail to appear.
    • Shorts Resume Stalling: Fixed a bug where Shorts videos failed to resume saved playback points.
    • Homepage/Grid Ads Saved as Regular Videos: Fixed a bug where auto-played masthead ads were inaccurately saved as legitimate.
    • Coexistence Ad Blocking Bug: Fixed critical race condition where ads in Shorts would prevent miniplayer from saving, and vice versa.
    • Fixed zombie loop after navigation: Prevented an infinite seek retry loop when navigating from watch to home.
    • Theme Detection: Fixed ReferenceError: isLightTheme is not defined.

    Removed

    • Removed Dead Code: Deleted the legacy processVideo and determineVideoContext functions, significantly reducing script complexity (~5000 lines).
    • Removed Dead Navigation Handlers: Removed unused preparation functions and dead variables.
    • Deprecated Legacy Metadata Logic: Removed obsolete playlist metadata polling paths.
    • Refining Polling Logic: Eliminated hundreds of lines of redundant DOM polling intervals, moving purely to event-driven updates.
  • v0.0.8 2026-02-21

    Init: bump youtube-helper-api to 0.9.4 version

    WIP: Context-aware extraction strategies to prevent data contamination

    WIP: Better miniplayer handling and Playlist naming

    fix: harden playlist association and Mix header titles

    perf: throttle playlist title HTTP fetches

    fix: stabilize Mix (RD...) playlist titles using seed video title

    fix: migrate and cleanup legacy YT_PLAYBACK_PLOX_playlist_meta_* keys into playlist_meta_*

    +fixed modal not loading on chromium browsers

    feat: show origin storage usage/quota in the saved videos modal

    Updated "watch" to "videos" Tweak migration

    fix: delete legacy GM keys properly to avoid null entries in Violentmonkey

    fix: ignore ypp_* meta keys in thumbnail normalization

    fix: exclude ypp_* meta keys from saved videos listing and exports

    Las metaclaves ypp_* ya no se listan ni se exportan como “videos”. Debido a que tras migracion se mostraban en modal de videos guardados.

    fix: detect explicit language preference before merging default settings

    fix: correct language detection and modal selection inconsistency

    fix: show script button in livestreams and prevent sticky preview type

    fix: refresh translations cache by aligning expected version with translations.json

    fix: update number version

    Merge pull request #18 from Alplox/refactorizanding

    0.0.8

  • v0.0.7-2 2025-11-15

    perf: reduce verbose debug logging in progress and status handlers

  • v0.0.7-1 2025-11-15

    fix: fixed time no longer breaks saving progress.

    Added

    • SVG for "unlocked."
    • The alert during fixed time setup now shows the minimum and maximum time available.
    • Translations for "live".
    • Clamp of the fixed time (forceResumeTime) when resuming playback if the value exceeds the actual duration of the video/short.
    • Validation of the fixed time entered from the saved video list so that, if it exceeds the actual duration of the video/short, an error message is displayed and the value is not saved.

    Changed

    • Bumped version of "YouTube Helper API" backup 0.7.2 to 0.7.5
    • The external translation system now invalidates the cache not only by TTL (6 hours) but also when the VERSION of the translations.json does not match the constant TRANSLATIONS_EXPECTED_VERSION in the userscript.

    Fixed

    • If the time used for "fixed time" exceeded the duration of the video, the script would no longer save after loading.
    • Livestreams were being wrongly tagged as "watch."
  • v0.0.7 2025-11-15

    Under construction

    Update youtube-playback-plox.user.js

    Update youtube-playback-plox.user.js

    ad detection still broken for shorts

    Some bug at saving while miniplayer active

    work

    Major update: new features, UI redesign, and bug fixes

    Added

    • Option to set a percentage to consider a video as "completed".
    • Compatibility with FreeTube history importing and exporting.
    • Migration function for the new format and compatibility with FreeTube from now on.
    • Filter for videos with a fixed playback time.
    • Fallbacks and validations for thumbnail loading.
    • Dark mode theme.
    • Support for saving while the miniplayer is playing on the homepage.
    • Progress bar color now matches the percentage viewed (can be disabled).
    • Function to generate a unique playlist color based on a name hash.
    • Option to share public playlists from saved videos.
    • YouTube Helper API: http://greasyfork.icu/es/scripts/549881-youtube-helper-api
    • Translations for new items/menus.
    • More logs and comments.
    • New user setting saveInlinePreviews (default: off).

    Changed

    • The message that displays the saving status on the player progress bar now also serves as a button to open a modal showing saved videos — in both regular and Shorts modes.
    • Emojis have been replaced with SVGs in the UI.
    • Saving progress in Shorts is now displayed below the video information, so when comments are toggled, it remains inside the player itself.
    • Complete UI redesign for a more “YouTube-like” look and feel.
    • Improved ad detection.
    • Message for saving progress now doubles as a button to open the config modal.

    Deprecated

    • createAdMonitor
    • observerTasks
    • ObservePlayer
    • ObserveShorts
    • exportDataToFile
    • importDataFromFile
    • showInitRetryToast

    Removed

    • “Locked” emoji on translations, now replaced with an SVG.
    • Emojis from the UI (in most places) to use SVGs.

    Fixed

    • Livestream detection. Lives with URLs of the type /watch now correctly get flagged as "live" using the YouTube Helper API or by detecting its metadata to determine whether the content is a regular video or a live stream.
    • If an ad was playing during miniplayer viewing, it could stop saving
  • v0.0.6-6 2025-10-31

    Refactor of the refactor of the refactor

    Will the translated metadata work this time?

  • v0.0.6-5 2025-10-31

    Refactor metadata for greasyfork translations compatibility - Part II

    Last try!

  • v0.0.6-4 2025-10-31

    Refactor metadata for greasyfork translations compatibility

    Bruh

  • v0.0.6-3 2025-10-31

    Removed blank lines on metadata

    Supposedly greasyfork cannot read and translate with the blank spaces there...

  • v0.0.6-2 2025-10-31

    Added translations, refactor language detection, update metadata

    Added

    • Translations for:
      • en-US
      • es-419
      • zh-TW
      • zh-HK

    Change

    • Improve language detection for format ISO 639-1 + ISO 3166
    • Ensure initialization logic uses saved language if valid, otherwise fallback to detected browser language or default.
    • Order of @name and @description tag in metadata to match order in translations.json

    Remove

    • Unused updatePlaylistVideo function
  • v0.0.6-1 2025-10-30

    fix: missing country codes in metadata

  • v0.0.6 2025-10-29

    feat: fix force time bug, add completed filter, and clear all button

    Code Optimization & Refactoring

    • Add helper functions to eliminate code redundancy:
      • [getSavedVideoData()]: unified video data retrieval (playlist/individual)
      • [updatePlaylistVideo()]: centralized playlist video updates
      • [callResumeWithDelay()]: consistent resume handling for shorts/regular videos
    • Reduce duplicated code across multiple functions
    • Bumped version to 0.0.6 in metadata files.

    Bug Fixes

    • Force time persistence: Videos with forceResumeTime now retain their fixed start time even after completion
    • Fixed issue where fixed time configuration was deleted when video reached the end
    • Modal now displays both "fixed time" and "completed" states simultaneously with gradient styling

    Playlist Improvements

    • Playlist headers in modal now link to last watched video instead of playlist page
    • Fixes broken links for Mix playlists (e.g., RDTAECb8D3EjE)
    • Pass lastWatchedVideoId to playlist items for proper URL construction

    Completed Videos Filter

    • Add "Completed" filter option in modal to view only finished videos
    • Allows users to quickly access their watch history of completed content
    • Complements existing "All", "Videos", and "Playlist" filters

    New Feature: Clear All

    • Add "Clear All" button to modal footer with danger styling
    • Includes confirmation dialog before deletion
    • 10-second undo toast notification with action button
    • Backup all data before clearing to enable restoration
    • Preserve user settings during clear operation

    Translations

    • Add translations for clear all feature in 48 languages:
      • clearAll, clearAllConfirm, allItemsCleared, undoClearAll
    • Update translations.json metadata (version, author, links)

    Styling

    • Add .ypp-btn-danger CSS class for destructive actions
    • Add .ypp-timestamp.forced.completed gradient style for dual-state videos
    • Improve visual hierarchy with hover effects on danger buttons
  • v0.0.5 2025-10-27

    Add logging system and improve player detection

    Added a global logging system for improved debugging and error reporting.

    Updated translations.json to remove unnecessary punctuation and ensure consistency.

    Refactored notification and toast logic, enhanced UI element creation, and updated default minimum save interval.

    Added ad detection before execution.

    Ensured progress is saved by vid even when plId exists, preserving playback position in dynamic Mix playlists (RD…).

    Bumped version to 0.0.5 in metadata files.

    Fixed an issue where videos in dynamic Mix playlists did not resume at the saved timestamp.

    Resolved http://greasyfork.icu/es/scripts/553387-youtube-playback-plox/discussions/313165

  • v0.0.4 2025-10-25

    Added compatibility with TrustedHTML

    change translations to json

  • v0.0.3 2025-10-24 Imported from URL
  • v0.0.2 2025-10-24 Imported from URL
  • v0.0.1 2025-10-22 Imported from URL