Scroll to the bottom of log files in web pages
We use supervisord on our systems, which has a handy browser based 'tail -f' feature. The problem is that the end of the log file appears off the bottom of the screen, and the browser won't scroll to the bottom automatically. This bookmarklet will keep the end of the page in view.
javascript:scroll=function(){setTimeout(function(){window.scrollTo(0,document.body.scrollHeight);scroll();},100);};scroll();
javascript:scroll=function(){setTimeout(function(){window.scrollTo(0,document.body.scrollHeight);scroll();},100);};scroll();
Comments
Copy the entire JavaScript code you provided: javascript:scroll=function(){setTimeout(function(){window.scrollTo(0,document.body.scrollHeight);scroll();},100);};scroll();
Paste the JavaScript code as the URL like https://gbwadownload.pro/gb-whatsapp-download/ of the new bookmark and save it.
Now, whenever you are viewing a log file in your browser using supervisord's 'tail -f' feature, simply click on the bookmarklet you created. It will start scrolling the page to the bottom automatically every 100 milliseconds, keeping the latest log entries in view.