Script to visually highlight if deployment worked (or not)

Disclaimer: Dieser Thread wurde aus dem alten Forum importiert. Daher werden eventuell nicht alle Formatierungen richtig angezeigt. Der ursprüngliche Thread beginnt im zweiten Post dieses Threads.

Script to visually highlight if deployment worked (or not)

function isInPage(text) { return document.documentElement.innerHTML.indexOf(text) != -1; }

var isDeployedSuccessfully = isInPage('OK - Deployed');
var isDeployedWithFailure = isInPage('FAIL - Deployed');

if(isDeployedSuccessfully) { document.body.style.background = '#167F1F'; }
if(isDeployedWithFailure)  { document.body.style.background = '#BF3E2F'; }

Kann man z.B. in Chromium mit https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija einbauen.