Search code examples
javascriptfacebookbookmarklet

Is it possible to write a bookmarklet that repeatedly jumps to the end of page?


Is it possible to write a bookmarklet that repeatedly jumps to the end of page in the background?

I want to scroll down "all the way" on Facebook. Currently I have to do it manually by sending End-of-page multiple times. I would like to do that automatically and in the background (i.e. I can continue browse in another window or tab while my Facebook tab scrolls down).


Solution

  • this might help

    you can use this code to scroll to the bottom of the page

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

    if you wrap it in a setInterval, you can make it repeat this might work

    javascript:setInterval(window.scrollTo, 1000, 0, document.body.scrollHeight)