Limit the number of thumbnail rows in youtube home.
⚬ PROBLEM: Youtube has lot's of new sections in home (they've been forever), and dang i don't like them at all, Ability to limit (or disable) them will work wonders (crude implementation will work for me) basically i don't want anything from Explore more topics
Maybe delete anything after (including this, may be also need to especially delete ytd-continuation-item-renderer element)
⚬ SOLUTION: Like Thumbnails Per Row and another option to limit rows or hide Other Sections/Disable Infinite Scrolling
⚬ RELEVANCE / SCOPE: I like it, and many users of untrap for youtube use this feature.
⚬ "SIDE EFFECTS": inconsistent element positioning perhaps, home page may look weird, loading problems ?
⚬ CONTEXT: This feature may be similar to one available in Untrap for youtube,
// Thank you!
| SHORT Table | (Summary) |
|---|---|
| Problem | Lots of unnecessary doom scrolling garbage on home screen, may be better than search page option |
| Solution | count and delete ytd-rich-item-renderer OR Maybe delete all elements after ytd-rich-section-renderer (especially ytd-continuation-item-renderer responsible for doom scrolling) |
| Scope | Home page, near Thumbnails per row option |
| Side effects | May mess with styling |
| Context | Home Page |
Separate issue from Linked Issue: Improve YT custom number of videos listed on homepage (closed)
I guess it should be simple because we already have the logic in place for 4 ~ 8 thumbs, it should be only a matter of adding an option to 3, but I need to check the code, and let you know.
hello can we have a number 0 too so that my youtube screen can be like this
its pretty good for zen workflows eliminating feed distractions
hello @wbalbo sir i have made this via simple edit to code can i send the pull request i have tested this on my machine?
hello @wbalbo sir i have made this via simple edit to code can i send the pull request i have tested this on my machine?
Do you mean the request from @lalishansh? If so, please create a Pull Request, and I can check. I can't merge, though, but @ImprovedTube can.
@adityacyan since you are already working on the code, please add the option to 3 thumbnails per row, as requested by the OP, @lalishansh
Ok i will add the 3 thumbnail one
for @lalishansh's wish, we can try to limit the number of thumbnail tile and sections to 11 and 1:
#contents > ytd-rich-item-renderer:nth-child(n + 12)
, #contents > ytd-rich-section-renderer:nth-child(n + 2)
{ display: none !important; }
(Tested.) So CSS is convenient. besides that we need JS if CSS cant do everything, it doesnt consider if the ytd-rich-items are actually grandchildren elements and children of #contents > ytd-rich-section-renderer, nor if you also hide some of those by our feature to hide shorts.
function hideTiles(selector, max) { const tiles = document.querySelectorAll(selector);
tiles.forEach((e, i) => { if (i >= max) e.style.display = 'none'; }); }
hideTiles('#dismissible', 5); hideTiles('ytd-rich-item-renderer', 5);
And then we might also want to prevent / block fetching more tiles when scrolling
or re run after yt-page-data-updated
( or else add #contents to our DOM mutation observer )
how to call this option? home page : show only the first 5 videos ?
@lalishansh
Yup sounds cool
would do this a little bit later , got some project work to do this week :(