Live data from Hacker News

Show HN: Two uBlock Origin rules to improve your Twitch experience

news.ycombinator.com

1–10 of 11 posts

Show HN: Two uBlock Origin rules to improve your Twitch experience

#1
It might come down to taste, but I feel like a lot of the "features" Twitch has been adding have cluttered the interface while offering little of value for someone like me who just watches streams occasionally and isn't closely involved in community events.

But most importantly, I'm bothered by the non-dismissable popups that now appear over the video feed. They seem to be for extensions, but what features they provide evades me.

These two uBlock Origin rules (which you can add in the My Filters tab) will remove the main two modals that can pop up over the video:

  www.twitch.tv##.extensions-dock-card
  ext-twitch.tv##.prime-extension-root
Additionally, you may want to get back a chat frame without a leaderboard header:

  www.twitch.tv##.channel-leaderboard
Twitch generates random class names, possibly to prevent your blocking some elements, so I tried to find the topmost classes. I hope that's useful to some.

Re: Show HN: Two uBlock Origin rules to improve your Twitch experience

#4

I added this, to get rid of the carousel of channels they're currently promoting. twitch.tv##.front-page-carousel

The one with auto-playing videos? Nice. Now Firefox blocks the auto-playing sound, but for a while this really was maddening.

Re: Show HN: Two uBlock Origin rules to improve your Twitch experience

#5
> Twitch generates random class names, possibly to prevent your blocking some elements, so I tried to find the topmost classes.

I don't use Twitch, so I'm not sure what these rules are blocking, but if there's any bit of consistent text in the elements these are targeting, you can do something like

    twitch.tv##div:has-text(Text To Block):xpath(../..)
There may be ways around this, ie here's the lengths Facebook go to write the word "Sponsored":

    
      
        
          
            
              -
            
            
              -
            
            
              -
            
            
              -
            
            S
            
              p
            
            
              -
            
            
              -
            
            
              -
            
            
              -
            
            o
            n
            
              -
            
            s
            o
            
              -
            
            
              -
            
            r
            
              -
            
            
              -
            
            
              -
            
            
              -
            
            
              -
            
            e
            d
            
              -
            
            
              -
            
            
              -
            
          
        
      
    

Re: Show HN: Two uBlock Origin rules to improve your Twitch experience

#6
post #5

> Twitch generates random class names, possibly to prevent your blocking some elements, so I tried to find the topmost classes. I don't use Twitch, so I'm not sure what these rules are blocking, but if there's any bit of consistent text in the elements these are targeting, you can do something like twitch.tv##div:has-text(Text To Block):xpath(../..) There may be ways around this, ie here's the lengths Facebook go to…

I bet screen readers love that

Re: Show HN: Two uBlock Origin rules to improve your Twitch experience

#7
post #5

> Twitch generates random class names, possibly to prevent your blocking some elements, so I tried to find the topmost classes. I don't use Twitch, so I'm not sure what these rules are blocking, but if there's any bit of consistent text in the elements these are targeting, you can do something like twitch.tv##div:has-text(Text To Block):xpath(../..) There may be ways around this, ie here's the lengths Facebook go to…

I bet screen readers love that

Hmm if it's actually impacting screen readers this is an ADA violation probably.

Re: Show HN: Two uBlock Origin rules to improve your Twitch experience

#8
post #5

> Twitch generates random class names, possibly to prevent your blocking some elements, so I tried to find the topmost classes. I don't use Twitch, so I'm not sure what these rules are blocking, but if there's any bit of consistent text in the elements these are targeting, you can do something like twitch.tv##div:has-text(Text To Block):xpath(../..) There may be ways around this, ie here's the lengths Facebook go to…

Last time I took a peek at it, they were changing up the order of the letters in “Sponsored” in the HTML and using some front end shenanigans to reposition the letters to spell out the word. Pretty devious, but I do wish we were spending mankind’s geniuses on this kind of thing.

Re: Show HN: Two uBlock Origin rules to improve your Twitch experience

#10
post #7

Earlier quoted context omitted.

I bet screen readers love that

Hmm if it's actually impacting screen readers this is an ADA violation probably.

Looking back at my adblock rules[1], FB used to use `aria-label=Sponsored`. Seems they stopped doing that, most likely because it was crazy simple to target and remove.

[1]: https://github.com/mikew/adblock-rules/blob/ed8f0b0511d66c44...

Post reply on HN