YouTube Leanback - Enhanced Userscript
This userscript enhances the YouTube Leanback app (primarily for smart TVs and devices) by providing full control over various features such as disabling ads, enabling background playback, and customizing user agent strings. It also enables seamless remote control functionality, allowing you to easily cast content from your phone or other devices to your TV.
Features
- Background Playback: Keep videos playing even when the browser tab is not in focus.
- Ad Blocking: Automatically removes ads from YouTube TV, giving you an uninterrupted viewing experience.
- Custom User-Agent String: Modify the user agent string to simulate a console (e.g., Xbox Series X) to unlock features or avoid device restrictions.
- Remote Control: Easily control the YouTube Leanback app from your phone or another device.
- Profile Switching: Switch between multiple profiles easily without syncing with Google Chrome accounts.
- UPnP Multicast Support: Cast content from one device to another seamlessly across your network.
Prerequisites
- A modern web browser (e.g., Chrome, Firefox)
- Tampermonkey or a similar userscript manager
Installation
1. Install Tampermonkey
If you don't already have a userscript manager, install Tampermonkey for your browser. Tampermonkey is available for Chrome, Firefox, Safari, and other popular browsers.
2. Install the Userscript
- Download or copy the userscript from the provided link.
- Open Tampermonkey, click on the "Add a new script" option.
- Paste the script content into the editor.
- Save the script.
3. Activate the Script
Ensure that the userscript is enabled in Tampermonkey. It should automatically run when you visit the YouTube Leanback app or the related YouTube TV site.
How to Use
Once the script is active, the following features will be automatically applied:
- Background Play: You no longer need to worry about videos pausing when switching tabs or minimizing your browser.
- No Ads: Ads will be blocked on YouTube TV, giving you an uninterrupted viewing experience.
- Console Mode: The script modifies the user-agent to simulate a device like Xbox Series X, allowing you to access features optimized for that device.
- Remote Control: You can now remotely control your YouTube Leanback app from your phone or tablet by using Google Cast or the native controls.
- Profile Switching: Switch between multiple profiles using the built-in functionality of the YouTube TV app without requiring a Google account sync.
Known Issues
- Some features may not work as expected on non-compatible devices or browsers.
- Profile switching may require manual logout or re-login if syncing with a Google account.
Contributing
If you'd like to improve this script or add additional features, feel free to fork the repository, make your changes, and submit a pull request.
License
This script is provided under the MIT License. Feel free to use, modify, and share it according to the terms of the license.
Note: This script is intended for personal use only. Modifying the functionality of YouTube TV or bypassing features may violate YouTube's terms of service. Use this tool responsibly and at your own risk.