Jump to content
UBot Underground

Scroll to bottom


Recommended Posts

I have a script thats going through my wordpress sites so I can check some stuff, but I want it to scroll to the bottom of the page. How can I make it scroll down?

 

Richard

Link to post
Share on other sites

Hey TJ - what would be the best way to detect if you have hit the bottom of a site using that command?

 

I have a site that would be a lot easier to play with using that javascript trick, but how would I loop the command until you can't page down anymore?

 

Any ideas appreciated and thanks again for that helpful little tip!

Link to post
Share on other sites

Hey TJ - what would be the best way to detect if you have hit the bottom of a site using that command?

 

I have a site that would be a lot easier to play with using that javascript trick, but how would I loop the command until you can't page down anymore?

 

Any ideas appreciated and thanks again for that helpful little tip!

 

If I'm correct, what TJ has given will indeed scroll to the bottom, as the params for window.scrollTo() are: x pos , y pos,

 

so

 

window.scrollTo(0,document.body.scrollHeight)

 

should scroll to height of the current container ( in this case, the web page), which will be to the bottom of it, if that makes sense.

 

Phil

Link to post
Share on other sites

normally you wait x seconds after you loop to the bottom. then you can look for something that normally shows up like a loading image or something telling you more results are waiting to appear.

 

and loop while exists, wait 1 second.

 

normally most sites that do this have a maximum number of times you can get more information at the bottom. find that key number and loop that entire process that many times.

  • Like 1
Link to post
Share on other sites

Phil, TJ.

 

Thanks for the fast replies - I guessed that would be the answer.

Just wondered if there was something magical that would keep it looping auto-magically :)

 

Will continue with some loops checking if the footer has changed.

 

Again - thanks for the fast reply, it is appreciated!

Link to post
Share on other sites
  • 2 weeks later...

Phil, TJ.

 

Thanks for the fast replies - I guessed that would be the answer.

Just wondered if there was something magical that would keep it looping auto-magically :)

 

Will continue with some loops checking if the footer has changed.

 

Again - thanks for the fast reply, it is appreciated!

 

 

You can try this out .. works like a baby for me :-).

 

loop(100) {

wait(1)

run javascript("window.scrollBy(0,50); // horizontal and vertical scroll increments

scrolldelay = setTimeout(\'pageScroll()\',100); // scrolls every 100 milliseconds")

wait(1)

}

  • Like 1
Link to post
Share on other sites

You can try this out .. works like a baby for me :-).

 

loop(100) {

wait(1)

run javascript("window.scrollBy(0,50); // horizontal and vertical scroll increments

scrolldelay = setTimeout(\'pageScroll()\',100); // scrolls every 100 milliseconds")

wait(1)

}

 

this is exactly what I was looking for, thanks Kazzo!

Link to post
Share on other sites
  • 1 year later...

have it use focus, and can focus on a link at the bottom of your page, or can use

 

 

run java script

 

and use

 

window.scrollTo(0,document.body.scrollHeight);

 

The JS function worked like a charm for me! Thanks!

  • Like 1
Link to post
Share on other sites
  • 2 months later...
  • 2 months later...
  • 3 months later...
  • 10 months later...
  • 2 years later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...