Edit: Replies to this thread indicate this is not fully correct as it exists on all browsers; and is likely an ad thing.

182 points

If the person who tweeted this scrolled down in the hackernews thread, they’d see this code was misinterpreted. It’s part of an anti Adblock script that runs 5s after page load. Still shitty, but less insidious

permalink
report
reply
11 points
*

Oh they think that delay in the beginning is malicious .

I noticed a huge drop in bandwidth until I logged out of YouTube. This was a onetimer however.

permalink
report
parent
reply
71 points

Don’t use the youtube website. On any browser. Use freetube instead, if your situation and use case allows it. No Google bullshit required. Loads fast, no ads, no tracking. Fully self contained.

permalink
report
reply
53 points

I really appreciate you saying “if your situation and use case allows it”. I’m sick of people “suggesting” these kind of things by just saying “don’t do this” “stop doing that” while completely ignoring that not everyone has the same use cases, preferences and possibilities for such.

permalink
report
parent
reply
5 points
*
Deleted by creator
permalink
report
parent
reply
4 points

You can proxy through Invidious or use a local API

permalink
report
parent
reply
1 point

Optionally yes

permalink
report
parent
reply
5 points

Does freetube show recommendations? Most free clients seem to scrape your subscriptions and lack features like playlists.

permalink
report
parent
reply
5 points

I wish there was a GTK Piped client. Freetube has that kinda janky feeling of a browser (it’s an Electron app, so not surprising) and I don’t see why I wouldn’t just use Piped in a browser then.

permalink
report
parent
reply
62 points

Whoever posted this is not a programmer. Does no conditional on that code so it would run on every browser on every session so where’s the check for Firefox?

Unless they are claiming that it is injected at runtime. But that’s easily provable/disprovable with agent spoofing.

permalink
report
reply
34 points
*

In the demo I saw they did an agent spoofing to Chrome and the delay went away, but it didn’t look very extensively tested. As others said, the disappearance on reload could easily be because they thought he was returning to the page and had already seen the ad/been punished for not seeing the ad and so something ad-related disappeared instead.

permalink
report
parent
reply
17 points

Iirc the thing is it loads a different js file when it detects chrome which doesn’t have the 5s delay. The reasoning is this is part of some anti adblocker code and chrome didn’t need the extra logic.

permalink
report
parent
reply
2 points

The code is still present when spoofing the user agent or even using a freshly installed chrome. The demo video loafing faster after spoofing can be due to many different reasons.

If you want a better break down of what the code could be used for, this guy foes a good job: https://old.reddit.com/r/firefox/comments/17ywbjj/whenever_i_open_a_youtube_video_in_a_new_tab_its/ka08uqj/

permalink
report
parent
reply
1 point

So it’s got nothing to do with Firefox it’s to do with preventing and blocking so it’ll happen on Chrome as well.

permalink
report
parent
reply
35 points

It would not be the first time Google was caught doing this. A couple years ago they were caught breaking apps like google maps if your user agent string wasnt chrome.

But recently I’ve noticed they can tell regardless of that string. So my guess is that they’ve hidden fingerprinting code in the chrome browser

permalink
report
reply
11 points

I hate how easy is for websites to fingerprint users…

permalink
report
parent
reply
2 points

Yep, and it doesn’t help that google controls almost all web browsers. They literally give websites your personal information now that cookies are no longer allowed.

So if you’re gay and live in Iraq, you better make absolutely sure to only visit your school’s website on computer you lend from friends or school computers

permalink
report
parent
reply
26 points

This is not correct.

Most of the posts/articles reference following reddit post: https://old.reddit.com/r/firefox/comments/17ywbjj/whenever_i_open_a_youtube_video_in_a_new_tab_its/k9w3ei4/ . It shows the code from your screenshot. However the code does not check the user agent and is not injected server side (I checked by user agent spoofing and using a freshly installed chrome). So it will run on every browser and cannot be used against some specific ones.

There is an answer to the post everyone seems to reference, which goes a bit deeper into what the code could do: https://old.reddit.com/r/firefox/comments/17ywbjj/whenever_i_open_a_youtube_video_in_a_new_tab_its/ka08uqj/

permalink
report
reply

Firefox

!firefox@lemmy.ml

Create post

A place to discuss the news and latest developments on the open-source browser Firefox

Community stats

  • 1.8K

    Monthly active users

  • 887

    Posts

  • 17K

    Comments

Community moderators