
Show HN: DotYouTube – A tiny Chrome extension to block YouTube pre-roll ads - kylebenzle
https://github.com/KyleBenzle/DotYouTube
======
perardi
I don’t necessarily mind ads. Gotta pay for content somehow, micro-
transactions haven’t worked, and I’m approaching some weird psychological
threshold where I just don’t want to see another subscription on my credit
card.

But ughhhhhh YouTube advertisements are so bad for me. I constantly get weird
”sexy witch girl” mobile game promos, I assume because I watch competitive
Pokémon videos. _(Spoiler, algorithm, gay male, don’t care about scantily glad
witch girls.)_ Just grating dumb ads for stuff I definitely won’t buy.

And it doesn’t have to be that way, seemingly. Instagram has me targeted
perfectly. I actually _find interesting stuff to buy_ off Instagram ads. That
algorithm has me down pat. I don’t find those ads disgusting it all. (Or I get
a kick out of the insane Wish ads.)

~~~
londons_explore
Google, despite being the biggest player in the ad industry and a leader in
machine learning, actually seems remarkably poor at selecting good ads to
show.

I think part of that is their data compartmentalizing for privacy reasons
(they won't use your Gmail emails to your mum complaining that your drain is
blocked to recommend 'magic drain unblocking washing liquid'). It's probably a
good thing, but the other platforms don't have any qualms using such data if
they have it...

I also think they listen to the advertiser too much... For example, they give
advertiser's a lot of control over who sees the ads, which creatives are used,
what times of day to show them, etc.

It turns out a machine learning algorithm can do much better than a human at
selecting when to show my ad...

~~~
ezoe
The question is, does showing the precise target matched ads profit the Google
more? If not, Google has no incentive to improve in that regard. By showing
you ads, Google has already been profiting. All Google need to do is showing
you the ads from the highest bidder while it's also not annoying enough for
you to leave the web site. The highest bidder's ads tend to be rather nasty.
But if you don't stop using the web site because of the ads, Google win.

~~~
londons_explore
The highest bidder will only bid high if those ads work for their business.

Therefore, Google has a direct incentive to make their ads work better for
advertisers.

------
TekMol
Looking at the code, this seems to not block ads but redirect the browser to
youtube.com. which in the past did not show ads.

As far as I know, this trick does not work anymore.

~~~
kylebenzle
Yep, it appends a dot after ".com". Is it no longer effective for you?

~~~
TekMol
No. Does it work for you?

------
catalogia
> _A Tiny Extension to Block (Some) YouTube Pre-Roll Video Ads_

Or just use uBlock Origin to block (All) the ads, on youtube and virtually all
other sites.

~~~
tokamak-teapot
Is there a good solution for mobile? I was thinking of always going via
wireguard to home then back out via pihole. I can’t find an ‘out of the box’
way to configure both together though. I have plenty of unused Linux boxes
sitting around that could do this, I think.

~~~
bgdam
If you're on Android, use Firefox for Android and install uBlock origin. You
can also install Video Background Play fix add-on to force Youtube to keep
playing in the background.

~~~
dastx
You can also use YouTube Vanced if you're on Android

------
katktv
doesn't ublock origin practically make it redundant

~~~
princekolt
Seems YouTube has some checks to see if the ad is running. I'm currently
unable to watch videos because I just get a black rectangle, and if I click it
it shows an error.

I've found an easy way to bypass this issue though: Click Share > Embed, the
preview window is playable. Start playing video from there, put it on full
screen, profit!!!

~~~
lordofgibbons
I don't get this issue on either Firefox or Chrome on linux running with
uBlock and Privacy Badger. Maybe you're part of the A/B test, and it has yet
to be rolled out fully?

~~~
trymas
I'd agree with the parent comment.

Couple weeks ago using ublock origin when browsing youtube would make youtube
almost unusable. For me - if I'd have a direct link to video - the video would
load and show, but the website itself wouldn't. Basically from user's point of
view it was completely blank page with only video showing, no related videos,
no comments, no like/dislike or anything. :)

So I needed to turn off ublock origin for youtube and everything came back to
normal. I am using pihole though, but it was basically useless for youtube
ads.

Though couple days ago, I've turned on ublock origin and youtube was working
as usual and it was ad-less.

------
chmaynard
My advice is to forget this nonsense and sign up for YouTube Premium. It's
good for the soul, and the ladies appreciate guys who can pay their way in
this world.

------
tiku
The weird thing is that one period I almost get no ads, the it starts again.

Anyway the algorithm of yt sucks, I only get the same content. Is there a
better index?

~~~
tartoran
In terms of exploring music, yes, YouTube’s algorithm is terrible. There’s no
real exploration, one keeps on falling into the same tracks over and over
again. No matter how obscure a band or musician is eventually I will end up
with the same playlists of promoted stuff. Are used to be a bit more random
and it was better. I almost always am not interesated into the promoted
results anyway

------
surround
Context: You can bypass youtube ads by adding a dot after the domain

[https://news.ycombinator.com/item?id=23479435](https://news.ycombinator.com/item?id=23479435)

YouTube fixed this a week later

[https://news.ycombinator.com/item?id=23581118](https://news.ycombinator.com/item?id=23581118)

~~~
tartoran
Tried it and it did not work for me. Maybe they closed the loophole?

~~~
JadeNB
> Tried it and it did not work for me. Maybe they closed the loophole?

That's exactly what your parent said:

> > YouTube fixed this a week later

> >
> [https://news.ycombinator.com/item?id=23581118](https://news.ycombinator.com/item?id=23581118)

------
ganastor
[https://invidio.us/](https://invidio.us/) works great too.

~~~
StavrosK
What is that, exactly? There isn't any explanation on the site.

~~~
surround
Invidious is an alternative front-end to YouTube

[https://github.com/omarroth/invidious](https://github.com/omarroth/invidious)

------
satvikpendem
You can use uBlock Origin to block all ads, and use SponsorBlock to skip ads
inside the video itself, such as sponsor promotions, and even intro/end
sequences. It really cuts out all of the bullshit in YouTube videos.

------
akerro
µblock does it, don't install 5 things when you can install one.

~~~
aciswhat
uBlock Origin != uBlock!

~~~
akerro
yes

------
The_Founder
Tiny enough to paste the whole thing here. Clever trick to insert a "." after
the .com that seems to trick some of the ad targeting. Wonder how many other
sites this works on?

chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {

    
    
        if (changeInfo.status === "loading" && /youtube.com/.test(changeInfo.url)) {
    
            let url = new URL(tab.url);
            if (!url.hostname.endsWith(".")) {
    
                url.hostname = url.hostname + ".";
                chrome.tabs.update(tabId, { url: url.href });
            }}})

