I've recently had some fun learning about browser extensions. Then at some moment I read a person on LPSG explaining how to access videos without the
infamous refreshing technique
by using the video preview image URL and some substitution patterns.
That motivated me to write some code (this extension) encapsulating that.
It unlocks all videos seamlessly and automatically.
Read on if you're interested.
Demos
(names of extracted folders and files may vary as new versions are released, follow the instructions in
Installation
below)
Chrome
Firefox for Android
What does it do?
It's a local (unpublished)
JavaScript extension
that leverages known URL patterns in the LPSG pages to unlock the videos.
For example, take this image/video preview on
cdn-videos.lpsg.com:
There are other rules like this that I ended up figuring out along the way.
This code makes the best guesses to find out the video location and test its URL. Upon success, it "injects" a video container with the correct URL. If it fails, it has no
effects on the page.
Is it safe?
Yes, for two reasons.
First, you
can open the code yourself and see what it does.
It's not complicated at all and I strove to document it. (I'd link my GitHub account here but I wish to remain anon). It mainly inspects elements in the page for some data
and re-organizes a bunch of divs.
The only HTTP request it makes is to
LPSG's own CDN
to make sure the video exists with the file format guessed. The overwhelming majority of videos are MP4, but exceptions are not rare.
Secondly, the extension can be uninstalled at any time and some browsers even do that automatically upon closing. This is designed as a safety measure regarding locally
installed code.
If the videos seem to stop being unlocked, please check whether the extension has been automatically removed - if so, just repeat the steps in
Installation
below.
Limitations & important info
Someone kindly reached out to me reporting that they could
make it work on iOS
by using
Orion browser by Kagi.
See
Installation
below for (unreviewed) instructions on Apple systems.
It's highly recommended to
create a free account and log into LPSG.
While inline videos are detected and unlocked even if you're a guest, more videos are shown on the posts
(and can be unlocked)
if you're authenticated.
Some browsers may automatically remove the extension when closed.
If this happens, simply reinstall it.
If you're using
Private windows/Mode
, remember to
manually allow the extension to run in those too.
These steps may slightly vary in different browsers, but do the following:
after successfully installing LPSG Video Unlocker,
locate it in the Extensions menu, select Manage Extension and
toggle ON Private Windows.
Specifically in the
personal gallery pages
(lpsg.com/gallery/some-user) you'll need to right-click the video and
open it in a new tab
so the extension can unlock it correctly.
Locate the file
lpsg_video_unlocker.firefox.xpi
and drag-and-drop it onto a Firefox window. An installation prompt will be triggered. Check the box allowing its use in private windows if you wish and click
Add.
Done! Videos are unlocked after a few seconds. Refresh any open pages.
Android - Firefox
This is a bit advanced but it's the only way to unlock videos on Android. It works with both vanilla and other flavors of Firefox such as Nightly and Developer.
You'll need to enable
extension installation from files,
which is a hidden feature.
Open the app, head to
Settings
and click on
About Firefox.
Tap the logo 5 times. This will enable
Developer/Debbuging Options.
Download and extract
LVU_1.0.zip
onto your device.
Back to Firefox, head to
Settings
and click on
Install extension from file
(which should be visible now). Locate the files extracted on step 2 and select
lpsg_video_unlocker.firefox.xpi
. Check the box allowing the extension to work in private windows if you wish.
Done! Videos are unlocked after a few seconds. Refresh any open pages.
Though not tested by me personally, this process should be similar in all Apple systems.
Install
Orion browser by Kagi
from the App Store or
Kagi's website.
Open it and on the three-dot menu at the bottom (or similarly) click
Settings
and then
Advanced.
Toggle
Firefox Extensions
ON.
Download and extract
LVU_1.0.zip
onto your device.
In Orion, open the three-dot menu again and click
Extensions.
Locate and click on the
(+) option.
Select
Install from File
and pick file
lpsg_video_unlocker.firefox.xpi
extracted on step 3.
Done! Videos are unlocked after a few seconds. Refresh any open pages.
And that's it. I've had lots of fun coding this, enjoy!