Created
March 15, 2021 16:01
-
-
Save dineshba/1fde891ca519abff1bdb8a084a894f20 to your computer and use it in GitHub Desktop.
Jenkins console Scroll to bottom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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