Skip to content

Instantly share code, notes, and snippets.

@cawal
Last active December 27, 2023 17:54
Show Gist options
  • Save cawal/1b7e9c4d6fd16b730e4ceb4aeda60038 to your computer and use it in GitHub Desktop.
Save cawal/1b7e9c4d6fd16b730e4ceb4aeda60038 to your computer and use it in GitHub Desktop.
Environment Marker - Liber RabbitMQ
// ==UserScript==
// @name Environment Marker RabbitMQ
// @namespace Violentmonkey Scripts
// @match https://rabbitmq-management.liber.capital/*
// @grant GM_addStyle
// @version 1.0
// @author https://github.com/cawal/
// @description Never execute anything in production
// ==/UserScript==
GM_addStyle(`
#enviroment-marker {
background-color: #ff0000 !important;
border: 0px solid #ac9 !important;
padding-left: 2em !important;
position: fixed;
min-height: 30px;
min-width: 100%;
z-index: 1000;
}
`)
const body = document.querySelector("body");
const container = document.createElement("div");
const label = document.createElement("p");
label.innerHtml = "PRODUÇÃO"
container.setAttribute("id", "enviroment-marker");
body.insertBefore(container, body.childNodes[0]);
container.appendChild(label);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment