Last active
August 29, 2015 14:03
-
-
Save ehlertij/733960bd73bd9502f74e to your computer and use it in GitHub Desktop.
NewRelic Auto-expand top bar
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== | |
// @match https://rpm.newrelic.com/* | |
// @version 2 | |
// ==/UserScript== | |
// a function that loads jQuery and calls a callback function when jQuery has finished loading | |
function addJQuery(callback) { | |
var script = document.createElement("script"); | |
script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"); | |
script.addEventListener('load', function() { | |
var script = document.createElement("script"); | |
script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();"; | |
document.body.appendChild(script); | |
}, false); | |
document.body.appendChild(script); | |
} | |
function main() { | |
$("nav.product_switcher").addClass("open") | |
} | |
addJQuery(main) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Download and drag this file into chrome://extensions/ with "Developer Mode" checked to install in Google Chrome.