Skip to content

Instantly share code, notes, and snippets.

@dineshba
Created March 15, 2021 16:01
Show Gist options
  • Save dineshba/1fde891ca519abff1bdb8a084a894f20 to your computer and use it in GitHub Desktop.
Save dineshba/1fde891ca519abff1bdb8a084a894f20 to your computer and use it in GitHub Desktop.
Jenkins console Scroll to bottom
// ==UserScript==
// @name Jenkins console Scroll to bottom
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *jenkins*
// @grant none
// ==/UserScript==
function sleep (time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
(function() {
'use strict';
let url=window.location.href
if (url.match(/\d+\/console$/g)) {
sleep(1500).then(() => {
window.scrollTo(0,document.body.scrollHeight);
});
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment