Skip to content

Instantly share code, notes, and snippets.

@ehlertij
Forked from anonymous/ey_cloud_prod.user.js
Last active October 13, 2015 23:08
Show Gist options
  • Save ehlertij/4270618 to your computer and use it in GitHub Desktop.
Save ehlertij/4270618 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @match https://cloud.engineyard.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() {
if($('#app .environment-name').text().indexOf('production') >= 0){
background = {
'background-color': "rgba(255, 0, 0, 0.55)",
'background-image': "url('http://i.imgur.com/i8KY7.gif')",
'background-position': 'left top',
'background-repeat': 'repeat'
}
$('#content').css(background)
$('.page').css('background-color', 'white')
}
document.title = $('#app .environment-name').text().trim().split(/\n/)[0];
}
addJQuery(main)
@ehlertij
Copy link
Author

Download and drag this file into chrome://extensions/ with "Developer Mode" checked to install in Google Chrome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment