Guest User

uBO Filter for YouTube Premium Members

a guest
Feb 18th, 2026
26
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.41 KB | None | 1 0
  1. ! Title: uBO Filter for YouTube Premium Members
  2. ! Description: This filter set resolves playback issues for Premium users while allowing procedural cosmetic filtering.
  3. ! ------------------------------------------------------------
  4.  
  5. ! ============================================================
  6. ! 1. Disable forced variable assignment
  7. ! Stops the process of overwriting variables to "no ads" at the moment YouTube loads.
  8. ! For Premium members, this injection can cause player logic conflicts and playback bugs.
  9. ! ============================================================
  10. m.youtube.com,music.youtube.com,tv.youtube.com,www.youtube.com,youtubekids.com,youtube-nocookie.com#@#+js(set, ytInitialPlayerResponse.playerAds, undefined)
  11. m.youtube.com,music.youtube.com,tv.youtube.com,www.youtube.com,youtubekids.com,youtube-nocookie.com#@#+js(set, ytInitialPlayerResponse.adPlacements, undefined)
  12. m.youtube.com,music.youtube.com,tv.youtube.com,www.youtube.com,youtubekids.com,youtube-nocookie.com#@#+js(set, ytInitialPlayerResponse.adSlots, undefined)
  13. m.youtube.com,music.youtube.com,tv.youtube.com,www.youtube.com,youtubekids.com,youtube-nocookie.com#@#+js(set, playerResponse.adPlacements, undefined)
  14.  
  15. ! ============================================================
  16. ! 2. Disable JSON data pruning
  17. ! Prevents the script from stripping ad-related sections out of the communication data.
  18. ! Ensures data integrity for Shorts and Premium environments.
  19. ! ============================================================
  20. m.youtube.com,music.youtube.com,tv.youtube.com,www.youtube.com,youtubekids.com,youtube-nocookie.com#@#+js(json-prune-fetch-response, reelWatchSequenceResponse.entries.[-].command.reelWatchEndpoint.adClientParams.isAd entries.[-].command.reelWatchEndpoint.adClientParams.isAd, , propsToMatch, url:/reel_watch_sequence?)
  21. m.youtube.com,music.youtube.com,tv.youtube.com,www.youtube.com,youtubekids.com,youtube-nocookie.com#@#+js(json-prune, entries.[-].command.reelWatchEndpoint.adClientParams.isAd)
  22. m.youtube.com,music.youtube.com,youtubekids.com,youtube-nocookie.com#@#+js(json-prune, playerResponse.adPlacements playerResponse.playerAds playerResponse.adSlots adPlacements playerAds adSlots important)
  23.  
  24. ! ============================================================
  25. ! 3. Disable string replacement (trusted-replace)
  26. ! Stops the forced replacement of "adPlacements" with "no_ads" in network responses.
  27. ! This allows the browser to receive the original, unmodified data from YouTube.
  28. ! ============================================================
  29. tv.youtube.com#@#+js(trusted-replace-xhr-response, '"adPlacements"', '"no_ads"', /playlist\?list=|\/player(?:\?.+)?$|watch\?[tv]=/)
  30. www.youtube.com#@#+js(trusted-replace-fetch-response, '"adPlacements"', '"no_ads"', player?)
  31. www.youtube.com#@#+js(trusted-replace-fetch-response, '"adSlots"', '"no_ads"', player?)
  32. www.youtube.com#@#+js(trusted-replace-xhr-response, /"adPlacements.*?([A-Z]"\}|"\}{2\,4})\}\]\,/, , /playlist\?list=|\/player(?:\?.+)?$|watch\?[tv]=/)
  33. www.youtube.com#@#+js(trusted-replace-xhr-response, /"adPlacements.*?("adSlots"|"adBreakHeartbeatParams")/gms, $1, /\/player(?:\?.+)?$/)
  34.  
  35. ! ============================================================
  36. ! 4. Whitelist network requests (@@)
  37. ! Excludes specific API communications from uBO's blocking/filtering.
  38. ! Interference with these APIs is a major cause of "infinite loading" or playback failure
  39. ! in Premium environments.
  40. ! ============================================================
  41. @@||www.youtube.com/playlist?list=$xhr,1p
  42. @@||www.youtube.com/watch?$xhr,1p
  43. @@||www.youtube.com/youtubei/v1/player?$xhr,1p
  44. @@||youtube.com/youtubei/v1/get_watch?$xhr,1p
  45. @@||googlevideo.com/initplayback?source=youtube&*c=TVHTML5&*oad=$xhr,domain=youtube.com
  46.  
  47. ! 5. Normalize ad system status checks
  48. ! Prevents the player from crashing/stopping by redirecting failed ad scripts to a "dummy" success script.
  49. @@||doubleclick.net/instream/ad_status.js^$script,redirect-rule=doubleclick_instream_ad_status.js:5
  50. @@||doubleclick.net^$xhr,redirect-rule=noop.txt
  51.  
  52. ! 6. Target-specific replacement filter bypass
  53. @@||youtube.com/youtubei/v1/get_watch?$xhr,1p,replace=/"adSlots"/"no_ads"/
  54.  
  55. ! 7. Allow other ad-related scripts and domains
  56. ! Crucial for maintaining normal site behavior when not logged in or in certain regions.
  57. @@||m.youtube.com/*/ad.js$script
  58. @@||youtube.com/pagead/
  59. @@||google.com/pagead/1p-user-list/
Advertisement
Add Comment
Please, Sign In to add comment