| 1 | ||
| 1 | ||
| 1 | ||
| 1 | ||
| 1 |
Tired of 30-minute rambles that say in half an hour what could be said in five? This userscript automatically hides any YouTube video over 20 minutes so your feed stays tight, relevant, and high-signal.
Why the 20 minute mark? Because that is the exact point where to fit a video under 20 minutes careful planning a scripting is needed. This makes the content higher value in total, and indeed much higher value per second. Under 20 minutes the creator has to plan pacing. Over 20 minutes the creator has to exploit padding tricks. Remember, an entire television episode can fit in around 20 minutes. The limitation is planning not time. If it reaches over 20 minutes to share an opinion on a small and trivial thing = they didn't plan and their content is not worth your time.
Give the userscript a try and see if you spend less time on low value, long length videos.
// ==UserScript==
// @name YouTube: Hide 20+ Minute Videos
// @version 1.0.0
// @description Auto-hides YouTube videos longer than 20 minutes. This reduces distraction from long winded clickbait, fixes pacing, and saves time.
// @match https://www.youtube.com/*
// @run-at document-start
// @grant none
// ==/UserScript==
(function(){
var LIMIT = 20*60;
var TIME_NODES = [
'ytd-thumbnail-overlay-time-status-renderer span',
'span.ytd-thumbnail-overlay-time-status-renderer',
'.badge-shape-wiz__text'
].join(',');
var CARD_NODES = [
'ytd-rich-item-renderer',
'ytd-video-renderer',
'ytd-compact-video-renderer',
'ytd-grid-video-renderer',
'ytd-playlist-video-renderer',
'ytd-playlist-panel-video-renderer'
].join(',');
function addStyle(){
if (document.getElementById('yt-hide-long-style')) return;
var s = document.createElement('style');
s.id = 'yt-hide-long-style';
s.textContent = '.yt-hide-long{display:none!important}';
document.documentElement.appendChild(s);
}
function parseSeconds(txt){
if (!txt || txt.indexOf(':')<0) return 0;
txt = txt.trim().replace(/[^\d:]/g,'');
var parts = txt.split(':');
var sec = 0;
for (var i=0;i<parts.length;i++) sec = sec*60 + (parseInt(parts[i],10)||0);
return sec;
}
function scan(root){
var els = root.querySelectorAll(TIME_NODES);
for (var i=0;i<els.length;i++){
var t = (els[i].textContent||'').trim();
if (t.indexOf(':')<0) continue;
var s = parseSeconds(t);
if (s >= LIMIT){
var card = els[i].closest(CARD_NODES);
if (card) card.classList.add('yt-hide-long');
}
}
}
function start(){
if (!document.body) return setTimeout(start,50);
addStyle();
scan(document);
var mo = new MutationObserver(function(muts){
for (var i=0;i<muts.length;i++){
var a = muts[i].addedNodes;
for (var j=0;j<a.length;j++){
var n = a[j];
if (n && n.nodeType===1) scan(n);
}
}
});
mo.observe(document.body,{subtree:true,childList:true});
}
start();
})();
Superb. Although there are hour long interviews that are of equally high quality which will then be hidden too.
Also I heard that jewtube promotes 10 minute long videos and creators have adapted to that, actually increasing taking that amount of time to say what can be said in a few minutes. A good example of that is Jimmy Dore. It's 10 minutes out of which eight is rambling.
Freetube also has a length filter, by the way. Medium length only shows content between 4 and 20 minutes.