[HN Gopher] Browser extension that globally blocks vertical video?
       ___________________________________________________________________
        
       Browser extension that globally blocks vertical video?
        
       I dislike nearly everything about the recent vertical video
       format/medium that's taken over the internet since ~2018 or so. Is
       there an extension that globally blocks it across
       twitter/tumblr/youtube/anywhere embedded? Feels like it'd be pretty
       trivial to code if not, and I know there's a few other old web
       farts who would gladly use such an extension.
        
       Author : kradeelav
       Score  : 6 points
       Date   : 2024-06-14 20:50 UTC (2 hours ago)
        
       | runjake wrote:
       | I'm probably much older than you and I don't mind, and in fact, I
       | regularly watch vertical videos. They don't bother me.
       | 
       | But here is some sloppy code you could create a basic browser
       | extension and shove in content.js:                 function
       | hideVerticalVideos() {         const videos =
       | document.querySelectorAll('video');         videos.forEach(video
       | => {           if (video.videoHeight > video.videoWidth) {
       | video.style.display = 'none';           }         });       }
       | // Run hideVerticalVideos() when the page loads
       | window.addEventListener('load', hideVerticalVideos);
       | // Run when the DOM updates       const observer = new
       | MutationObserver(hideVerticalVideos);
       | observer.observe(document.body, { childList: true, subtree: true
       | });
        
       | ivanjermakov wrote:
       | It would be very hard to get rid of portrait videos that were
       | uploaded as landscape but padded with black bars.
        
       ___________________________________________________________________
       (page generated 2024-06-14 23:02 UTC)