raingart / Nova-YouTube-extension

Apache License 2.0
218 stars 11 forks source link

[Feature] force-load recommended (sidebar, desktop) #149

Closed KamelittaOida closed 10 months ago

KamelittaOida commented 10 months ago

hello o/ o/ <3

would you be interested in implementing a force-load for the recommended section?

YouTube tends to put there good results when you browse a topic that you have searched for. The current downside is I have to grape the End key or page-down and I don't see any options for it in Nova.

Nothing aggressive just something soft but steady in loading.

best regards. thanks for all your work. much appreciated (still).

KamelittaOida commented 10 months ago

I installed tabiew and tried your CSS but I still have to scroll for 3/4 of the list to load.

raingart commented 10 months ago

ok, delete the script and replace css

#related #contents {
    flex-direction: column-reverse;
    display: flex;
}
KamelittaOida commented 10 months ago

oh ok I see what it is doing. it's interesting that CSS is all that is needed. it loads it instantly.

but what I meant was, load the sidebar like auto-expand the description box or auto-expand the comments because instead of searching the sidebar, I have to manually interact with it first to get all results.

raingart commented 10 months ago

Why don't you like the previous css code? it make inverse sorting. I certainly don't see the difference between the video at the end of the list and the beginning. Let's assume that it exists. Then let's make it so that the inversion only happens when you mouse over at it.

#related:not(:hover) #contents {
    flex-direction: column-reverse;
    display: flex;
}
KamelittaOida commented 10 months ago

I'm an idiot. as always.

#related #contents { flex-direction: column-reverse; display: flex; }

I never saved that code.

yea works. loads in inverse. ingenious

KamelittaOida commented 10 months ago

lol I think they already changed something or it's a coincidence. (this is not logged in) They added the 'show more' button. unless that button was there all along. First time I'm seeing it.

image

script/idea is still working wonderfully though. thank you. the one on display is "mine". There are two different 'secondary-results' styles. One with those tags and one without (above). with tags:

image

raingart commented 10 months ago

I don't have this button right now. Perhaps it will appear later. Or the number of videos in the sidebar depends on the inclusion of history. Which I have turned off.

if you understand js, then here is an example code of how to autoclick on a button

// ==UserScript==
// @name         Youtube  script
// @namespace    youtube-script-name
// @version      0.1
// @description  
// @author       raingart
// @include      https://www.youtube.com/*
// @run-at       document-end
// @license      Apache-2.0
// @noframes     
// ==/UserScript==
/*jshint esversion: 6 */

(function() {
const interval = setInterval(() => {
   let _patched;

   document.body.querySelectorAll('buttonSelectorName:not([lock="true"])')
      .forEach(el => {
         el.setAttribute('lock', 'true');
         el.click();
         _patched= true;
      });

    if (_patched) clearInterval(interval);

}, 1000); // 1sec

// stop job
setTimeout(() => clearInterval(interval), 1000 * 10); // 10sec

})();
KamelittaOida commented 10 months ago

I'm sorry I gave off the wrong impression. I wasn't sneakily asking you to do anything. I was merely documenting my surprise. Seemed like this was the most fitting place.

Let's see what they will do with logged-in profiles. If that button were to come, maybe you'd be able to write something that will press it X amount of customizable times, because for now it feels like it loads forever and also the amount that it loads. I've only pressed it 5 or 6 times before giving up because the page eventually becomes so long, it's not worth it anymore.

Feels to me like some google engineer is following your project. Oddest of coincidences. If only they would listen to (my) feedback sent through their Feedback button. probably clogged up to the brim.

again I want to thank you for the CSS code. I actually prefer it over a nova setting because I can use the Stylus icon to toggle the crawling.

well I might as well:

(now I can't think of what else I submitted. I believe It had to do something with profiles and searching. -.-)

raingart commented 10 months ago

About the coincidence They probably have a module for identifying user action patterns. And when these actions resemble automatic ones (bots). Then part of the site’s functionality may be replaced. For example, for deeper testing or to prevent unwanted actions.

KamelittaOida commented 10 months ago

I was thinking the same. but I can't believe I caused such a massive spam. I tend to use (g)rape functions very sparingly cause I wouldn't want things to change 😆😅 either way, funny.