• C 47.7%
  • C++ 42.9%
  • JavaScript 6.3%
  • Makefile 3%
  • Shell 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-02-14 23:30:45 -05:00
.github/workflows Fix CI: checkout plugin source to separate path to avoid copy-into-self 2026-02-14 11:53:22 -05:00
include Fix SponsorBlock proxy: add SSL callback, auto-redirect, and increase response header size 2026-02-14 11:44:04 -05:00
source fix clunky adskip and toast 2026-02-14 23:30:45 -05:00
build.sh fix ui breaking 2026-02-14 23:08:54 -05:00
inject.js fix clunky adskip and toast 2026-02-14 23:30:45 -05:00
Makefile add sponsorblock 2025-10-04 22:12:34 -04:00
README.md Update README.md 2025-10-06 18:30:16 +00:00
welcome_dialog.js Replace green banner with native YouTube TV toast notification 2025-10-04 00:58:59 -04:00

YouTube Ad Block + SponsorBlock for PS4

having issues? join me on xmpp! xmpp:main@conference.grr.llc?join

A GoldHEN plugin that skips ads and sponsored segments on the PS4 YouTube Cobalt app.

Compatible with: YouTube v02.32 from pkg-zone.com (CUSA01015)

Features

  • ✅ Automatic ad skipping
  • ✅ SponsorBlock integration - Skip sponsored segments, intros, outros, and more
  • ✅ Native YouTube TV toast notifications
  • ✅ Local HTTP proxy server for SponsorBlock API access
  • ✅ Clean, silent operation (no debug logs)

Installation

  1. Download the plugin

  2. Copy to PS4

    • Copy yt_adblock.prx to /data/GoldHEN/plugins/ on your PS4
  3. Configure GoldHEN

    • Edit /data/GoldHEN/plugins.ini to add the following:
    [CUSA01015]
    /data/GoldHEN/plugins/yt_adblock.prx
    
  4. Restart YouTube

    • Close and reopen the YouTube app
    • You should see a "SponsorBlock Enabled" toast notification

How it Works

Ad Skipping

The plugin hooks into the YouTube Cobalt app's HTML script execution engine and injects custom JavaScript that detects and skips ads automatically.

SponsorBlock Integration

The plugin creates a local HTTP proxy server on localhost:4040 that:

  1. Receives requests from the injected JavaScript
  2. Fetches segment data from the SponsorBlock API using PS4's native HTTP library
  3. Returns the data to JavaScript
  4. Automatically skips sponsored segments during playback

This approach bypasses Cobalt browser's XHR security restrictions without needing CSP bypass.

Toast Notifications

You'll see native YouTube TV toast notifications for:

  • Plugin enabled: When YouTube loads
  • Segments found: When SponsorBlock segments are detected (e.g., "SponsorBlock: 3 segment(s) found")
  • Segment skipped: When a segment is automatically skipped (e.g., "Segment Skipped: sponsor (15s)")

Technical Details

  • Hooks HTMLScriptExecute at address 0x0097fb40
  • Local HTTP proxy server on port 4040
  • Uses PS4 native networking (sceNet, sceHttp, sceSsl)
  • JavaScript injection via local buffer for stability
  • SponsorBlock API: https://sponsor.ajay.app

Building from Source

Make sure $OO_PS4_TOOLCHAIN is in your PATH (see OpenOrbis for install and setup instructions)

cd GoldHEN_Plugins_Repository/plugin_src/test2
./build.sh

The compiled plugin will be in ../../bin/plugins/prx_final/test2.prx

Debug Build

To enable debug logging:

DEBUG=1 ./build.sh

Credits

License

MIT License - See LICENSE file for details