Brian Lovin
/
Hacker News

Show HN: Firefox add-on to open YouTube videos in alternative front ends

github.com

YouTube started blocking me because I use an adblocker. So I made this simple Firefox Add-On (haven't made it cross-browser yet, contributions welcome!) to open videos in alternative front-ends (piped.video by default).

Default keybinding: Alt+J to reopen current page in the configured frontend.

Shift+Click to open any video in a new tab in the configured frontend.

You can change the default frontend to something else if you like.

Daily Digest email

Get the top HN stories in your inbox every day.

ryandrake

It would be nice if browsers were able to get around all these kinds of shenanigans directly, instead of having to always reach for extensions and addons and endlessly participate in this cat and mouse game. After all, the browser is supposed to be the user's agent. Its job is to do what the user wants and fetch the content that the user asks for.

Somewhere along the path, we've made a terrible turn and allowed the browsers to become agents of the web developers instead, gatekeeping on behalf of web sites, rather than serving the user's interests.

My ideal browser would load up a site like YouTube, and, knowing my already-configured preference for ad-free, minimalist layout, would present it as a Craigslist-style list of links with thumbnails, ignoring the mess of JS and CSS that the site's developer futilely sends.

atleta

Lookig at it source (the page downloaded when you open a YT link pointing to a video), it's almost certain that YT doesn't load without JS. It's not an html page with some extra functionality implemented in JS, it's a web app that builds the web page you see from JS.

So firefox can't do much about it without actively trying to circumvent YT and YT specifically.

I don't think browsers made the turn you mention. It's more like browsers became more and more capable and web developers made use of it. Sometimes it's annoying because most websites are not websites anymore but apps (GUIs) that run in the browser and some of the web sites/apps people use could never work without it. Sure, we could all deploy those apps onto our machines (or have them deploy automatically in a sandbox) and there were actually technologies that did just that (think java web start or whatever the name ended up being) but they lost to what we have now: running these apps in the browser.

Also, you can't have an ad-free experience if the price of using a service is that the ad is delivered to you. On YT you can buy a subscription and you'll see no ads. But sure, most sites don't offer this.

matheusmoreira

> So firefox can't do much about it without actively trying to circumvent YT and YT specifically.

There's no reason why Firefox couldn't do that.

> Also, you can't have an ad-free experience if the price of using a service is that the ad is delivered to you.

Sure I can, uBlock Origin provides exactly that. They are not entitled to my attention. If they have a problem with that, they can return 402 Payment Required.

asmor

That's excessive scope creep. Adding site-specific workarounds for some sites feels uncomfortable. Who decides what websites get "fixed", and how? That's a great bit to move to addons. Maybe recommend them more visibly instead.

Also, remember how Mozilla is funded.

atleta

There are a lot of reasons why Firefox or other browsers can't do that, but my claim was that FF (or any browser) can't do it without writing code specifically to get around YT. And this was a response to the parent who said that FF should (and could) simply just ignore the CSS.

> Sure I can, uBlock Origin provides exactly that.

Obviously, I meant that it doesn't work financially so there is no point being upset about it. If enough people block the ads then they'll do something about it. Actually it's not hypothetical anymore, I just started to see these warnings a few days ago. (I wasn't deliberately blocking the ads, I've been just using ghostery which, it seems, started blocking YT ads.) So yeah, in the end, as you also say, people in general can't consume ad supported services without paying with their attention. It just doesn't work business wise.

Fnoord

If youtube-dl (or its successor) can do it; so can a browser (extension). Whether the browser should natively allow this I leave up to the browser devs.

> Also, you can't have an ad-free experience if the price of using a service is that the ad is delivered to you. On YT you can buy a subscription and you'll see no ads. But sure, most sites don't offer this.

Websites have various models: non-profit, donation-based, advertising-based, tracked-based. A website like YouTube still has high profit margins as they do tracking as well.

hombre_fatal

What’s the difference between tracking and ad revenue? If you refuse to even let them serve you ads (and won’t pay for premium) what exactly are you contributing to those who create the content that you want? Or is that just the creators’ problem?

mandmandam

> Also, you can't have an ad-free experience if the price of using a service is that the ad is delivered to you. On YT you can buy a subscription and you'll see no ads.

Just to be very clear, those are not the only two possible options.

YouTube - and Facebook, Google, Whatsapp, etc - are extraordinarily simple concepts. We don't need private corporations running them for profit. In fact, it's turning out really bad for us.

yakshaving_jgt

You're welcome to build an alternative and claim their kingdom.

The reason that hasn't happened yet is because whether or not you find YT an extraordinarily simple concept, the execution is tremendously difficult.

BiteCode_dev

Now that DRM are part of the web standards, and TPM are generalized, it's game over.

I predict youtube will escalate this way:

- Pump up aggressive anti ad block measures.

- It will fail, so they will enforce DRM so that they have control.

- It will not be enough, so they will ask to only serve DRM to "trusted browsers".

- And it will not suffice, so the trusted browser will have to run on a trusted OS checked by hardware.

That will work since almost nobody will take the risk to jailbreak their expensive device.

And we will all have lost.

Tor3

If the day comes when it's impossible to watch Youtube without ads I'll have to leave, despite how important youtube is for me currently. I just can't watch ads. It's impossible. I don't watch a single TV channel with ads, it's too painful. So, advertisement-supported "moving pictures" (or sound, for that matter - I never listen to radio channels serving ads either) is out of the question, with no exceptions for me personally.

ta1243

My understanding is you can pay a relatively small amount and get ad-free youtube. At least google ads. You'd still need sponsorblock.

That said I do like a well designed sponsor. Map Men for example, I'd rather not watch them.

BiteCode_dev

Tv says there are plenty of people who will suffer ads.

Spotify free offer is also proof of that.

_Algernon_

Youtube just isn't valueable enough (in my mind), to get away with that.

BiteCode_dev

The new generation knows mostly the web through jailed devices called "smartphones".

They will have no idea, and just assume that's how things are.

HN bubble strikes again.

matheusmoreira

Yup. Only way we can possibly win is by writing computing freedom into actual law. Make it literally illegal for them to use cryptography to violate our freedoms. Service providers should be required by law to interoperate with our computers, no matter what software we choose to run. If we reverse engineer their little apps and make free software versions, they should have to suck it up. We used to be able to buy whatever phone, modem or router we wanted and hook it up to the network with no issues. Software should work the same way.

doctor_radium

I'm thinking about a corollary to Net Neutrality (which is allegedly coming back thanks to the new Biden-appointed FCC commissioner) which states that public web sites need to be accessible by the public. I've ranted about this a few times on HN. This isn't about working around bugs and quirks in umpteen different versions of umpteen different browsers, but making sure we don't start actively coding hard stops again: "Your browser is too old" messages, endless Captchas, purposely giving one browser a clearly worse or even unusable experience. Incompetence would be embarrassing but not illegal. Whenever I find the time, I really want to send the FCC a registered mail packet with my proposal and lots of examples of why this is already necessary.

And yes, the web sites will need to suck it up. You can't choose your visitors...which may occassionally be a bot or screen scraper.

JodieBenitez

> And we will all have lost.

Or we will all be gone elsewhere ?

BiteCode_dev

Who? The people paying thousands of dollars for locked down mac devices they never modify, the ones giving all their data to social network and clicking on ads or the ones sending money to the NPC streamers to watch them licking an imaginary icecream?

HN is the opposite of their market.

petree

You can use NoScript to disable JS and see how well that works.

But more to the point, yes, a browser is a client, but without the economic incentive of either ads or direct monetization from users, many sites, YouTube included, would simply not work. Storage and bandwith costs money. Unless we decided to somehow fund all of this through some sort of additional tax through the ISPs or governments, ads or subscriptions are a necessary evil.

tgv

Storage and bandwidth cost money, but not $14/month. You can get a server for yourself for that kind of money, and I don't think YouTube has a server per user.

marticode

Producing content also cost money, and producers get a cut of the ads or the subscription.

petree

Sure, it is definitely more expensive than I would like. But you still have the option to watch the ads if you don't like paying a sub. Expecting it to be completely free is unrealistic though.

drdaeman

> Somewhere along the path, we've made a terrible turn

It was a variation of Eternal September that caused it. ;)

The majority of users became non-technical, so the focus had shifted as browser vendors needed to cater to different audiences.

tgv

Not needed, but could. Google simply exploited that possibility, from the start.

pmontra

How could that work, given that a web site can change its working every day? Each site can have its passionated circumvention developer that maintains an extension like this. Is it reasonable to expect that each browser can do the same for each website? And is it reasonable to expect it for Google's Chrome?

pbhjpbhj

It is within Mozilla's reach to spend an extra $200k on compatibility [hacks] for each of the top ten websites. Their CEO could easily take a $2M wage cut and still be overpaid.

vorticalbox

I guess in an idea world servers would return only data and browsers would style that data to each yours preferred looks.

anon_cow1111

I don't think firefox could reasonably do this, just because a significant part of their funding comes directly from google.

And maybe more relevant, having this be default behavior would just cause the cat-and-mouse to get worse, when the majority of users are now blocking it with no effort, and the bean-counters notice the ad impression numbers suddenly dropping.

PH95VuimJjqBqy

this is true from a practical standpoint.

It's like an adult watching a child's idealism and knowing the child is right.

I'm not calling the OP a child, I'm saying the OP is right and the world sucks.

undefined

[deleted]

tianqi

I'm not sure you can still "do what you want" because without ads Youtube would not exist.

globular-toast

Where does this idea that YouTube couldn't exist without ads? Not with it's current architecture, sure, but do people really lack the imagination to see a web with videos that aren't served by a monopoly? Peer-to-peer sharing has been around for a very long time and works very well. You can share large content right now with essentially no extra cost (you already pay for bandwidth, you already have storage etc).

The trouble is finding said content. There is a huge conflict of interest due to the most popular search engine also owning the most popular centralised content platform. This should never have been allowed to happen, but here we are.

butz

What you just described is "User agent stylesheet" and in theory you could build your own styles for any website which your browser will prefer.

SushiHippie

As others mentioned: https://libredirect.github.io/ It redirects so many pages to their privacy friendly frontends. Can't use the internet anymore without this extension.

kiliankoe

It's especially helpful for medium posts imho. The alternatives load several orders of magnitude faster.

marttt

For a few years, I've been using the Redirector add-on [1] to redirect Yotube URLs to various Invidious instances. No ads, and easy to tailor the visual experience to your needs.

Here's my Redirector rule:

  Youtube
  Redirect: https://www.youtube.com/*
  to: https://invidious.protokolla.fi/$1
  Hint: Youtube > Invidious instance redirection
  Example: https://www.youtube.com/watch?v=hipBryeDc0E → https://invidious.protokolla.fi/watch?v=hipBryeDc0E
  Applies to: Main window (address bar)
As a parenting control trick, I also use Redirector to direct some of the more immersive gaming sites to about:blank for our 10yo son. Definitely proud of that hack, ha.

1: https://addons.mozilla.org/en-US/firefox/addon/redirector/

redder23

The issue is that Invidious only supports 720p

unixfox

Not true, please consult the documentation: https://docs.invidious.io/faq/#table-of-contents

redder23

All the public instances I recently visited did not support >720. I remember having to specifically select it and it was not really working currently some time back I think.

kaliqt

What's preventing them from going higher? Also I think Invidious sorely needs UX updates to help make it easier to avoid having to go to Youtube.

tuan

Hmm I installed invidious yesterday and was able to watch 1080p. Maybe you need to update to the latest.

loveparade

I don't care as much about the privacy as I care about not messing up my Youtube recommendations. Any time I accidentally click on or hover over some BS video my front page is full of clickbait spam and I need to manually clean up my watch history.

I guess (?) it works for monetization, but the UX of YouTube and their pushing of clickbait content has become horrible over the past few years. I just wish they stopped trying to be "smart" about what I want to watch. I'm already paying for Premium, just give me an option to make Youtube stupid.

_Algernon_

The option for making youtube stupid has always been there. It is called the subscription feed: https://youtube.com/feed/subscriptions

You can hide all the other sections using an extension like UnHook: https://unhook.app/

loveparade

Thanks, I wasn't aware of Unhook. I know the I can use the subscriptions feed, but it doesn't solve all problems. When I open YT on my phone, or on my TV, I still get blasted with recommendations and clickbait. When I search for a keyword I get relevant results interspersed with clickbaity content (similar to Google SEO spam), and so on. This problem permeates the whole YT experience because the business model is maximize engagement metrics and ad view time at all costs.

Unhook looks good indeed, I guess I am just a bit frustrated that I need external extensions, many of which are linked in this thread, and hacks to fight against services that try to monetize my attention. Especially when I already pay for them.

zeta0134

I've long since blocked the recommendation content. No sidebar, no end-of-video overlay, no homepage content at all. Just a search box, thanks. (And even that's gotten functionally useless over the years; external search engines are much better at finding that one video I remember seeing but can't seem to convince YT proper to actually show me.)

Then again, I curate my subscriptions. Nobody I follow posts more than once every couple of weeks or so. Most days my subscription page looks the same as it did yesterday, so when I do have a new video to watch it's more like a rare treat.

wildrhythms

Certain 'categories' of Youtube videos is like dropping a nuclear bomb in your suggestions. Even accidentally clicking on it and immediately going back will poison the well. I have to go into my watch history and delete, and then spend days clicking 'three dots > Not interested' on the horrific thumbnails until Youtube stops recommending that category. I call it tending the garden.

Krssst

You can disable autoplay of videos on hovering in your YouTube settings. I disabled it and hovered videos stopped being added to my watch history.

https://support.google.com/youtube/thread/130441859/how-to-d...

Edit: not sure if the above page is up-to-date. On my side the setting is in "Settings - Playback and performance - Integrated playback" (setting name could be different, my interface is not in English so I translated the entry names)

pbhjpbhj

The algorithm just seems really blunt. You like a video on one category and then your entire feed becomes that category, it's not mixed into the other 100 categories of video you've liked.

Like you said, I'm sure this works for engagement, but it's pretty evil. I know they don't care about being evil anymore; but it's still annoying.

d3vr

Seems like there's a bit of confusion about what the add-on does exactly. It doesn't automatically redirect all YouTube pages you open.

This however gives you the choice to open the pages you want in an alternative frontend.

My use case is basically I browse the YT homepage and Shift+click the videos I want to watch. Or if someone shares a link to a video, I access that page and Alt+J to redirect to the alternative frontend.

Cilvic

Thanks for explaining, but what is an alternative frontend in this case?

d3vr

I've also just updated the README to make it more obvious what the extension does.

The default alternative frontend I have configured is https://piped.video , but you can use any different instance / service if it supports the same YouTube url scheme ({domain}/watch?v=...).

This is configurable in the add-on's options page, you can also access it by clicking on the add-on's icon

Cilvic

Thanks, I've looked at the docs of newpipe and invidious and neither make it straight forward to understand how they work. Both focus on "this is more private than watching on youtube"

It sounds like there is some kind of instance/server which my client/with a cleaner frontend will talk to.

But how does that work and why can youtube not detect it and block it?

ericra

The link[1] to the Firefox add-on page on your Github repo is dead. Has this just not been published yet?

[1] https://addons.mozilla.org/en-US/firefox/addon/yt-siphon/

d3vr

Thanks for reporting, Mozilla took some time to approve the add-on on their store. It's now available.

aftergibson

What does this do differently to Privacy Redirect? https://addons.mozilla.org/en-GB/firefox/addon/privacy-redir...

elashri

This addon seems not to be updated in years. I would like to mention LibRedirect [1] which offers more front ends for more websites and seems more actively developed [2]

[1] https://addons.mozilla.org/firefox/addon/libredirect

[2] https://github.com/libredirect/browser_extension

username135

+1 for libredirect

ploum

I also use libredirect but it has this annoying bug where the reddit redirect will randomly stop working and the only way to solve it is to completely uninstall the extension (not only disabling) then reinstall.

But I can’t stand anymore to be on Twitter or Medium so it is a must. I also use it for Youtube, stackoverflow.

I’m a bit confused by the current project because there are litteraly tenths of Youtube->invidious/alternative frontend and I don’t understand why this one is different.

ericra

Well, for one, the addon you linked has not been updated for over 2 years. This doesn't speak to the substance of your question really, but ad-blocking is a whack-a-mole game. Resources need to be constantly updated to keep up with companies' efforts to thwart them.

It's always nice to see new efforts in this space.

politelemon

On Android you can try NewPipe which serves as an alternate front end.

jszymborski

Can anyone recommend a NewPipe style desktop app?

elashri

FreeTupe [1] would be the closest thing you can have.

[1] https://freetubeapp.io

user234683

My project here is similar: https://github.com/user234683/youtube-local

It keeps everything in the browser while still being local to the machine

Schinken_

Invidious might be something worth looking at

ftk_

Here's how I use youtube, usually without opening web frontend at all:

Install mpv and yt-dlp.

Use play-with addon to open youtube or other video links directly in mpv.

Periodically convert youtube subscriptions into OPML using an userscript.

Import OPML into freetube or other RSS reader to check for new videos.

https://addons.mozilla.org/en-US/firefox/addon/play-with/

https://github.com/theborg3of5/Userscripts/tree/master/youtu...

gpgn

I saw the popup just once, I updated most of the filters used by uBlockOrigin and I haven't seen it since.

ksherlock

I made myself a bookmarklet last week to open the current URL with invidious. Not because of the adblocker prejudice (although there were reports, it hadn't hit me yet) but because YouTube was increasingly unable or unwilling to play videos.

As a side benefit, invidious can block comments and related videos so it's a better experience.

javascript:window.location=%22https://[your favorite invidious implementation]/watch%22+document.location.search

Krasnol

I'm using ublock Origin and have never seen any of those.

For those with ubO who still see them, cleaning the cache and updating the filters within ubO seems to help.

https://addons.mozilla.org/en-US/firefox/addon/ublock-origin...

d3vr

I am using ubO too, I just purged the cache and updated the filters, still experiencing the same issue. Maybe YT is still testing this and haven't rolled out the blocking on everyone just yet?

langsoul-com

Go on the unlock origin reddit, they have clear instructions for getting it working.

Basically disable all current ad blockers, including YouTube enhancer ad blocker, reset filters to default, make sure there's no cosmetic filters either. And it should work L.

PH95VuimJjqBqy

with ubO you can tell it to remove elements from a page permanently (every time it's loaded).

I just used the picker, removed the elements, saved it, and haven't looked back.

I also did this with the stack overflow nag.

OscarTheGrinch

Yeah I did this too, but my use case is ordered playlists of songs, and now every video pauses itself after a few seconds.

Gonna try the ublock reset as outlined above, failing that I'll test uMatrix to turn off / lobotomise specific scripts.

Jach

I've yet to encounter these also. I've assumed it's just been luck with the A/B testing.. But perhaps it could also be that I've never allowed doubleclick.net scripts to run in NoScript, or that my ublock-origin setup has taken care of itself, or that because I've actually participated in youtube's other non-premium monetization schemes (channel memberships) from which they take a 30% cut and they want to upset somewhat paying users last.

Daily Digest email

Get the top HN stories in your inbox every day.

Show HN: Firefox add-on to open YouTube videos in alternative front ends - Hacker News