Applications

Userscript#

The same job as the extension, for people who would rather not install one. It answers the same messages the site sends, so the site cannot tell the difference.

Pick one or the other. Running the extension and the userscript together means two things answering the same message.

Install#

Install a userscript manager — Violentmonkey or Tampermonkey.

Open the script and confirm your manager's install prompt.

Open setup — or Settings → Connections — and run through it once.

Your manager handles updates from here — the script points at its own source, so you get new versions the same way you get them for any other script.

Compared to the extension#

ExtensionUserscript
BrowsersChromium browsers, FirefoxAny browser with Violentmonkey or Tampermonkey
Safari, Orion, iOSNoNo
Source requestsYesYes
Headers on the player's requestsEvery requestPlaylists and segments, small direct videos
AnswersOnly the sites you allowAny page that asks
UpdatesThrough the browser's storeThrough your userscript manager

The extension can ask the browser itself to change headers. A userscript cannot, so it changes them inside the page instead. That covers a player loading a playlist and its segments, which is how nearly every source plays. A large video loaded directly is left alone rather than pulled into memory.

Configuration#

If you edit your own copy, set DEBUG at the top of the file to true to log what the script does.

Why does it run on every page?#

A userscript can only make a request from a page it is already running on, so it has to be loaded everywhere. It passes everything through untouched until a page sends it one of P-Stream's messages, and the code is short enough to read before you install it.

If you would rather limit it, the extension only answers the sites you allow, and the desktop app needs neither.

It's installed but the site doesn't see it#

Reload the P-Stream tab. The site only looks for the script on load.

Check your manager's dashboard shows the script as enabled, and that the manager itself is enabled for this site.

Make sure the extension isn't also installed. If both answer, the result is unpredictable — remove one.