Created
April 19, 2020 18:55
-
-
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
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 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