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 });Safari in particular has never worked, but I've had bad luck with Chrome and Firefox as well.
On a related note, is there a browser that can completely block auto-playing video with a setting that actually works?
I find it depressing that web developers seem willing to do anything to ignore user preferences, especially when intrusive advertising is involved.
Phones are commonly used in horizontal mode for games, photos, and video streaming.
In about:config:
media.autoplay.default = 5
media.autoplay.blocking_policy = 2
From https://www.privacy-handbuch.de/handbuch_21h.htm?q=autoplay
Searching on that site for autoplay leads to the same settings for Fennec on Android, but I don't dream of electric sheep, so ...
https://www.youtube.com/shorts/KaSmgzaKgYM
and https://www.youtube.com/v/KaSmgzaKgYM
are the same, so at least you can use some redirection extensions to always show you the full interface.Or use something like 'Simple Blocker' (FF) which would just block everything which includes `youtube.com/shorts/` in the URL.
I also recommend blocking "feed" page, side suggestions and comment section.