Skip to content

Instantly share code, notes, and snippets.

@cawal
Last active December 27, 2023 17:53
Show Gist options
  • Save cawal/ff36e1d4371ed2bde5c2592ee174c039 to your computer and use it in GitHub Desktop.
Save cawal/ff36e1d4371ed2bde5c2592ee174c039 to your computer and use it in GitHub Desktop.
Environment Marker Liber Monolith
// ==UserScript==
// @name Environment Marker Monolith
// @namespace Violentmonkey Scripts
// @match https://*.libercapital.com.br/*
// @exclude-match https://*staging.libercapital.com.br/*
// @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