Play with MPV (Enhanced)

Combines a floating button, thumbnail clicks, and a Shift+Click fallback context menu to play videos in MPV.

這裡只顯示彼此間有代碼差異的版本。 顯示所有版本。

  • v2025.07.18.10 2025-07-18

    fix enqueue url passing

  • v2025.07.18.9 2025-07-18

    # Changelog - Play with MPV (Enhanced) Userscript

    ## 2025.07.18.3

    ### Added

    * **Enqueue Mode Option:** Introduced a new `Enqueue Mode` setting in the userscript configuration panel. This option allows users to explicitly control the queueing behavior of `mpv-handler`.

    ### Changed

    * **`Enqueue Mode` Values:** Changed the values for the `Enqueue Mode` option from `true`/`false` to `on`/`off` for better clarity and consistency.
    * **Protocol Generation:** Updated the `generateProto` function to correctly incorporate the new `Enqueue Mode` setting into the `mpv://` protocol URL.
    * **Configuration Validation:** Modified the `GM_config` initialization to validate the `Enqueue Mode` setting with the new `on`/`off` values.
    * **Userscript Metadata:** Updated the userscript version to `2025.07.18.2`.
    * **Documentation Links:** Updated the `README.md` and `greasyfork.md` to reflect the correct link for this enhanced userscript and clarify its compatibility with the `mpv-handler` (queue mod).

    ### Removed

    * No features were removed in this version; only enhancements and adjustments were made.

  • v2025.07.18.2 2025-07-18

    [Fixed]

    Fixed Stale MPV Link on Navigation: Resolved a critical bug where the "Play with MPV" button link would not update after navigating to a new video from the homepage or suggestions sidebar. The script now reliably uses location.href to generate the MPV link, ensuring it always points to the currently active video.

    Fixed Video Player Not Pausing: Addressed a major issue where the in-browser video player would only pause on a direct page load. The pausing logic was completely overhauled with a robust polling mechanism. The script now "insistently" tries to pause the video for up to 5 seconds after any navigation, guaranteeing the player is paused consistently, regardless of page loading times.

    [Changed] & [Enhanced]

    Universal Thumbnail Interception: Replaced the specific and brittle thumbnail selectors with a universal and highly robust selector (a[href*="/watch?v="]:has(img)). This allows the script to correctly intercept clicks on video thumbnails across the entire YouTube website, including the homepage, search results, channel pages, history, and the watch page suggestions sidebar.

    Improved Fallback Context Menu: The Shift + Right-click context menu is no longer restricted from appearing on supported sites. It now functions as a universal fallback, allowing any link on any page to be opened with MPV.

    Default Console Setting Tweaked: The default value for the "Run With Console" option in the script's settings has been changed from "yes" to "no" for new setups or after a configuration reset.

  • v2025.07.18.1 2025-07-18

    - The previous version contained a bug that caused the play with mpv button to not load the link if you went directly to a video .../watch?... from a website other than YouTube or loaded it directly. This has been fixed.

    - The fallback menu has been updated to appear with any link you press shift + right click.

    - Changed default option for run with console to no

  • v2025.07.09.5 2025-07-09