Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var count = 0;
- var max = 10;
- var scrollToBottom = function() {
- window.scrollTo(0,document.querySelector(".ytd-page-manager").scrollHeight);
- }
- var scrollToTop = function() {
- window.scrollTo(0,document.querySelector(".ytd-page-manager"));
- }
- var scroll = function() {
- scrollToBottom();
- if ( ++count < max)
- setTimeout( function() {scroll()}, 500);
- else
- scrollToTop();
- }
- scroll();
Add Comment
Please, Sign In to add comment