Last active
February 3, 2023 04:58
-
-
Save justinkelly/fa696fe79d31b6c3a04554e2221d5ad4 to your computer and use it in GitHub Desktop.
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== | |
// @name EA Website testing | |
// @homepage https://gist.github.com/justinkelly/fa696fe79d31b6c3a04554e2221d5ad4 | |
// @version 0.1.4 | |
// @description EA testing | |
// @author Justin Kelly | |
// @include https://latte.nonprod.digital* | |
// @include https://mocha.nonprod.digital* | |
// @include https://preprod.nonprod.digital* | |
// @include https://www.energyaustralia.com.au* | |
// @icon https://www.energyaustralia.com.au//themes/custom/ea/assets/images/og-image-tag-2_4.jpg | |
// @namespace https://github.com/justinkelly/ea | |
// @supportURL https://github.com/justinkelly/ea | |
// @downloadURL https://gist.github.com/justinkelly/fa696fe79d31b6c3a04554e2221d5ad4/raw/EA_website_testing.user.js | |
// @updateURL https://gist.github.com/justinkelly/fa696fe79d31b6c3a04554e2221d5ad4/raw/EA_website_testing.user.js | |
// @grant none | |
// ==/UserScript== | |
function GM_addStyle(css) { | |
const style = document.getElementById("GM_addStyleBy8626") || (function() { | |
const style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.id = "GM_addStyleBy8626"; | |
document.head.appendChild(style); | |
return style; | |
})(); | |
const sheet = style.sheet; | |
sheet.insertRule(css, (sheet.rules || sheet.cssRules || []).length); | |
} | |
if (window.location.href.indexOf("latte") != -1) | |
{ | |
//body | |
GM_addStyle(".top, header {padding-top: 50px;}"); | |
GM_addStyle(".top, header {background-color: orange;}"); | |
GM_addStyle(".top, header {opacity: 1;}"); | |
GM_addStyle(".top, header:before {content: 'Latte - Dev: ';}"); | |
} | |
if (window.location.href.indexOf("mocha") != -1) | |
{ | |
//body | |
GM_addStyle(".top, header {padding-top: 50px;}"); | |
GM_addStyle(".top, header {background-color: yellow;}"); | |
GM_addStyle(".top, header {opacity: 1;}"); | |
GM_addStyle(".top, header:before {content: 'Mocha - Test: ';}"); | |
} | |
if (window.location.href.indexOf("preprod") != -1) | |
{ | |
//body | |
GM_addStyle(".top, header {padding-top: 50px;}"); | |
GM_addStyle(".top, header {background-color: #FFF300;}"); | |
GM_addStyle(".top, header {opacity: 1;}"); | |
GM_addStyle(".top, header:before {content: 'Preprod: ';}"); | |
} | |
if (window.location.href.indexOf("www") != -1) | |
{ | |
//body | |
GM_addStyle(".top, header {padding-top: 50px;}"); | |
GM_addStyle(".top, header {background-color: red;}"); | |
GM_addStyle(".top, header {opacity: 1;}"); | |
GM_addStyle(".top, header:before {content: 'Production: ';}"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment