🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

YouTube Helper API

YouTube Helper API.

Ниже показаны версии этого скрипта, в которых изменялся код. Показать все версии.

  • вер. 0.9.4 05.12.2025

    Added a 5th logging level.

  • вер. 0.9.3.3 05.12.2025

    Tweaked logging level for a few messages.

  • вер. 0.9.3.2 05.12.2025

    fix typo

  • вер. 0.9.3.1 05.12.2025

    fix typo

  • вер. 0.9.3 05.12.2025

    New Debug System: Added api.debug with 4 logging levels (minimal, typical, detailed, all). Logs point to the caller's line number.
    New Helpers: Added reloadToCurrentProgress() and exposed gmCapabilities.
    Internal Improvements: Library now uses the new debug system for cleaner console output and better error handling.

  • вер. 0.9.2 01.12.2025

    Moved 'use strict' to global scope.
    Added added a shim for Greasemonkey API functions. This should catch missing GM or permission not granted errors without crashing.

  • вер. 0.9.1 20.11.2025

    Fixed video playback language updates not being detected correctly.

  • вер. 0.9.1 20.11.2025

    Update comments and logging.

  • вер. 0.9.0 20.11.2025

    Switched to an isolated library pattern.

  • вер. 0.8.0 19.11.2025

    Updated to be a global singleton. (again)
    Updated to inject into the newer/broader globalThis instead of window.

  • вер. 0.7.6 18.11.2025

    Made language track detection more robust.
    Added logic to determine if the video is auto dubbed with its own appState value.

  • вер. 0.7.5 14.11.2025

    Updated API logic to match YouTube's new audio track format.

  • вер. 0.7.4 14.11.2025

    Fixed an issue that caused the script to notify itself being ready before the data has finished populating.

  • вер. 0.7.3 14.11.2025

    Fixed a bug that caused the script process videos before all video data has loaded into the video player.

  • вер. 0.7.2 09.11.2025

    Fixed a bug that caused the video html element to become stale after reloading throw YouTube's API. This seems to be new YouTube behavior introduced by the New Delhi (2025) UI update.

  • вер. 0.7.1 08.11.2025

    Fixed a race condition where ad states and video states can update in random order depending on loading conditions.

  • вер. 0.7.0 04.11.2025

    Fixed a bug that caused player updates to be handled event when video data does not exist.
    Fixed a race condition bug that caused the API to return incorrect data.

  • вер. 0.6.2.1 04.11.2025

    fix type

  • вер. 0.6.2 04.11.2025

    Excluded certain urls from being early processed.

  • вер. 0.6.1 26.10.2025

    Updated to track if the current video has been streamed or premiered. (basically any format that could have a chat log would return true)

  • вер. 0.6.0 25.10.2025

    Updated the API to directly reference read-only proxy objects for better performance.
    Updated page type to use the current page URL as fallback when YouTube's native API fails to return a proper response.

  • вер. 0.5.8 17.10.2025

    Updated how the player api fallback working when running in iframes.
    Updated the listener player update event.

  • вер. 0.5.7 01.10.2025
    New
    • Refactored storageApi to use a declarative lookup table, making it more readable and easier to extend.
    • Converted dynamic DOM element properties on the page object to use getters, ensuring references are always current on a Single Page Application.
    • Consolidated reloadVideo functions to remove duplicated code and follow the DRY principle.
    • Adopted underscore (_) prefix as a naming convention for internal functions to clearly separate them from the public API.
    • Added a console warning if a non-existent YouTube function was called through the API proxy instead of failing silently.
    Fixes
    • Fixed a bug that caused duplicate timeupdate event listeners to be added repeatedly by tracking listener attachment in a WeakMap.
    • Corrected storage functions to consistently use the storageApi abstraction instead of calling GM functions directly.
  • вер. 0.5.6 01.10.2025

    Added a fuction to reload the current video.

  • вер. 0.5.5 01.10.2025

    Added distinction between content that is live or was live (VOD), and content that is currently live exclusively.

  • вер. 0.5.4 29.09.2025

    Added a private event target so we don't fire event into the document directly. Global event handshake may eventually be added.

  • вер. 0.5.3 29.09.2025

    Use a singleton pattern for initiation to avoid duplicate events firing.

  • вер. 0.5.2 29.09.2025

    Fixed tracked playback progress not updating when loading a new video.

  • вер. 0.5.1 29.09.2025

    Updated all public storage functions to eager sync between script storage and local storage.
    Updated page type updating to listen for different events. Should now update earlier and more consistently.
    Fix time specified video detection. YouTube player response object turns out to be unreliable for this.

  • вер. 0.5.0 29.09.2025

    No longer exposing storageApi.
    Added public delete and list functions for synced storage.

  • вер. 0.4.8 29.09.2025

    Added support for time specified video detection.
    Added support for playlist id detection.
    Exposed storagedApi to publicApi.

  • вер. 0.4.7 29.09.2025

    Fixed ad detection and tracking.

  • вер. 0.4.6 29.09.2025

    Updated player selector for mobile.

  • вер. 0.4.5 28.09.2025

    Updated how premium bitrate options are determined.

  • вер. 0.4.4 27.09.2025

    minor update. no functional change.

  • вер. 0.4.3 27.09.2025

    Updated saving and loading logic to try to use both GM and localStorage in parallel.

  • вер. 0.4.2 27.09.2025

    Let consumer scripts to grant handling.

  • вер. 0.4.1 27.09.2025

    minor bug fix.

  • вер. 0.4.0 27.09.2025

    Testing if GM functions can be extracted to a helper api.

  • вер. 0.3.0 22.09.2025

    Implemented a custom video playback progress tracking function that avoids tracking ad playback progresses.
    Implemented a custom ad state tracking function.
    Implemented a custom function to reload the current playing video to the current tracked playback progress. Removed inline comments. Code is just updating too much to maintain comments at this point.

  • вер. 0.2.1 21.09.2025

    -

  • вер. 0.2.0 21.09.2025

    Added inline documentations.
    Added save/load functions for settings.

  • вер. 0.1.2 21.09.2025

    Delay initial player update check with the pageshow event listener.

  • вер. 0.1.1 21.09.2025
  • вер. 0.1.0 21.09.2025

    Added a proxy for YouTube's API

  • вер. 0.0.9 20.09.2025

    -

  • вер. 0.0.9 20.09.2025

    Changed page type finding logic. Could be reverted.

  • вер. 0.0.8.3 20.09.2025
  • вер. 0.0.8.3 20.09.2025

    test loading order.

  • вер. 0.0.8.1 20.09.2025

Показать все версии скрипта