README.md
February 21, 2026 · View on GitHub
YTPA - Play All For YouTube
Installation | Usage | Issues | License | PrivacyYTPA: A sophisticated userscript adding the Play-All button back to YouTube.
I got frustrated from not being able to binge-watch some YouTube channels. Unable to find a working userscript, I created this. Hopefully, it will be as useful to you as it is to me.
Also works with YouTube Shorts and supports the mobile browser version of YouTube.
Now with support for Random Play!
This project is actively maintained with automated tests and validation to keep it stable as YouTube evolves.
Installation
-
Install a userscript manager. For example, Tampermonkey:
-
On Chrome, Edge, Opera, and OperaGX make sure to enable developer mode.
-
Install this userscript by clicking this link.
-
On Chrome and Edge make sure to allow user scripts if the script does not load.
Available mirrors:
Demo For Latest/Popular Videos/Shorts
Usage
Once installed, you should be able to see the vibrant Play-All button when visiting or navigating to the videos section of a YouTube channel. Simply clicking it or opening the link in a new tab will send you to the newest video playing inside the "Videos" playlist.
It may take a few seconds for the button to be dynamically added.

Playing Sorted By Most Popular
When sorting by most popular, the button will take you to the "Popular videos" playlist.

Playing Random
It is possible to play all videos in random order by clicking the "Play Random"-button.
Shorts
Shorts can be played both by latest and most popular.

Live Streams

Play Random
It is now possible to play by random on desktop devices.

Optionally with custom shuffle priority (select by clicking ▾).

Issues
If your current installation does not work, please update it by following the installation steps above before opening issues.
Contributing and Testing
Contributions are welcome and will be automatically tested by GitHub workflows. npm
Basic Tests (easy)
Feel free to use the testing userscript after making a change.
- Install the testing script.
- Open your developer tools.
- Run
YTPATestSuite.test();. - Follow the instructions on screen.
In-Depth Tests (recommended)
Inside A Container
Either use Docker:
docker run --rm -it "$(docker build -q -f Containerfile .)"
Or Podman:
podman run --rm -it "$(podman build -q -f Containerfile .)"
Or your other docker-compatible container environment of choice.
Running Tests Outside Of Containers
To run the automated tests directly, you will need the following tools:
- npm
11.6.2 - spago
0.93.44(get the npm installspago@nextinstead of AUR or other repository) - Purescript purs
0.15.15
Install/Update Chrome
(cd testing && npm ci && npx puppeteer browsers install chrome)
(cd testing && npm ci && spago run -m Run.Test.All)
Playground - Forcing A Specific State
These are useful to get a browser instance with the userscript and a specific state of YouTube (like forcing a new UI).
See: Playground
Keep in mind forcing a UI will only work for ones that are yet to be deployed fully and asymmetrically released to some users. It is not possible to force a specific UI that no longer is available from YouTube. These scripts do not preserve previous UIs, the simply restart the browser until it has the new one.
# Change the module to your desired playground
(cd testing && npm ci && spago run -m Run.Playground.Ui.V20260219)
License
This project is licensed under the MIT License.
Important note:
This is not a typical userscript.
The project evolved into a resilient and semi-modular codebase designed to survive a hostile SPA environment. It includes its own single-file standard library modules, automated testing harness written in Purescript, and extensive fallback handling.
Is it overengineered? Yes.
Does this raise the barrier of entry to contributions? Yes.
Is it surprisingly stable? Yes.