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();

Comments

oscar clark said…
This comment has been removed by the author.
oscar clark said…
Create a new bookmark in your browser (you can do this by right-clicking on the bookmarks bar and selecting "Add Page" or a similar option).
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.
Gill said…
Great Article. Your writing skill is magnificent as ever
Jordan said…
It’s always useful to read content from other authors, Thanks
Jasiah said…
Its like you read my mind! This is magnificent blog. A great read
Reyna said…
Good work you show, Fantastic it is Good job
Kyla said…
Easily, the article is actually the best topic on this issue.
Shah said…
Thanks for the beautiful info you made. Great job. Thankyou

Popular posts from this blog

MinHash for dummies

Authenticating via Kerberos with Keycloak and Windows 2008 Active Directory

Fixing OpenVPN "Authenticate/Decrypt packet error: cipher final failed"