YouTube Helper API

YouTube Helper API.

بۇلار بۇ قوليازمىنىڭ كود يېڭىلانغان نەشرىلىرى. بارلىق نەشرىنى كۆرسىتىش

  • v0.5.7 2025-10-01
    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.
  • v0.5.6 2025-10-01

    Added a fuction to reload the current video.

  • v0.5.5 2025-10-01

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

  • v0.5.4 2025-09-29

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

  • v0.5.3 2025-09-29

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

  • v0.5.2 2025-09-29

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

  • v0.5.1 2025-09-29

    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.

  • v0.5.0 2025-09-29

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

  • v0.4.8 2025-09-29

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

  • v0.4.7 2025-09-29

    Fixed ad detection and tracking.

  • v0.4.6 2025-09-29

    Updated player selector for mobile.

  • v0.4.5 2025-09-28

    Updated how premium bitrate options are determined.

  • v0.4.4 2025-09-27

    minor update. no functional change.

  • v0.4.3 2025-09-27

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

  • v0.4.2 2025-09-27

    Let consumer scripts to grant handling.

  • v0.4.1 2025-09-27

    minor bug fix.

  • v0.4.0 2025-09-27

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

  • v0.3.0 2025-09-22

    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.

  • v0.2.1 2025-09-21

    -

  • v0.2.0 2025-09-21

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

  • v0.1.2 2025-09-21

    Delay initial player update check with the pageshow event listener.

  • v0.1.1 2025-09-21
  • v0.1.0 2025-09-21

    Added a proxy for YouTube's API

  • v0.0.9 2025-09-20

    -

  • v0.0.9 2025-09-20

    Changed page type finding logic. Could be reverted.

  • v0.0.8.3 2025-09-20
  • v0.0.8.3 2025-09-20

    test loading order.

  • v0.0.8.1 2025-09-20
  • v0.0.8 2025-09-20

    Bug Fixes

  • v0.0.7 2025-09-20

    Pass entire api with event.

  • v0.0.6.2 2025-09-20

    Update custom event name for consistency.

  • v0.0.6.1 2025-09-20

    Just use shallow copy. Deep freeze needs more logic to work properly and I have decided to hold off until absolutely needed.

  • v0.0.6 2025-09-20

    Updated getter logic in the public API section.

  • v0.0.5.2 2025-09-20

    fix bug

  • v0.0.5.1 2025-09-20
  • v0.0.5 2025-09-20
  • v0.0.3 2025-09-18

    Added playback resolution control functions.

  • v0.0.2 2025-09-18

    Added a bunch for stuff.

  • v0.0.1 2025-09-17