Skip to content

Instantly share code, notes, and snippets.

@tofran
Created April 19, 2020 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tofran/4f0e92a4bed751ef2402f23ad1671a28 to your computer and use it in GitHub Desktop.
Save tofran/4f0e92a4bed751ef2402f23ad1671a28 to your computer and use it in GitHub Desktop.
Userscript to add a shortcut to the HTML5 console in HP's iLo UI
// ==UserScript==
// @name HP iLo 4 console shortcut
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Adds a quick link to the HTML5 console in HP's iLo UI. Make sure you match the script to your server(s) IPs
// @author tofran
// @match https://<YPUR_SERVER_IP_HERE>/html/masthead.html
// @grant none
// ==/UserScript==
(function() {
'use strict';
console.log("hello wordl");
window.addEventListener("load", function(){
console.log("loaded");
const sparator = document.getElementById("masthd_buttons_spaces");
if(!sparator){
console.log("Could not find #masthd_buttons_spaces");
return;
}
const consoleLink = document.createElement("a");
consoleLink.innerText = "Open console";
consoleLink.addEventListener("click", function(e){
e.preventDefault();
window.iLO.startHtml5Irc();
})
const newSeparator = sparator.cloneNode(true);
sparator.parentNode.insertBefore(newSeparator, sparator);
sparator.parentNode.insertBefore(consoleLink, sparator);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment