Prod Detect

Displays a simple warning bar at the top of your site if you're on production.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Prod Detect
// @namespace    http://jordanbalagot.com/
// @version      0.11
// @description  Displays a simple warning bar at the top of your site if you're on production.
// @author       Jordan B
// @match        http://www.google.com/*
// ==/UserScript==

//Replace http://www.google.com/* with your production URL.
if(window.location.href.indexOf("http://www.google.com/") > -1)
{
    window.onload = function(){
        var proddiv = document.createElement("div");
        proddiv.id = "proddiv";
        proddiv.innerHTML = "PROD";
        document.body.appendChild(proddiv);
        var css = document.createElement("style");
        css.type = "text/css";
        css.innerHTML = "body { margin-top: 20px; } ";
        css.innerHTML += "#proddiv { position:absolute;text-align:left;top:0;width:100%;height:16px;opacity:1;z-index:100;background:red;color:white;padding:4px;}";
        document.body.appendChild(css);
    };
}