Skip to content

Instantly share code, notes, and snippets.

@ArnaudD
Created August 23, 2010 16:14
Show Gist options
  • Save ArnaudD/545787 to your computer and use it in GitHub Desktop.
Save ArnaudD/545787 to your computer and use it in GitHub Desktop.
/**
* Pour utiliser ce gist, ajouter cette ligne à la fin de votre <body> :
* <script type="text/javascript" src="http://gist.github.com/raw/545787/gistfile1.js"></script>
*/
if (document.location.href.indexOf ('-test.univ-avignon.fr') >= 0) {
var elem = document.createElement ('div');
var url = document.location.href.replace ('-test.univ-avignon.fr', '.univ-avignon.fr');
elem.setAttribute ('style', 'color: red; text-align: center; margin: 5px; font-weight: bold;');
elem.innerHTML =
'Vous travaillez sur une plateforme de test, vos données risquent d\'être perdues à tout moment !<br />'+
'<a style="color: red; font-size: smaller; font-weight: normal;" href="'+url+'">'+
'Utilisez la plateforme de production de préférence</a>';
document.body.insertBefore (elem, document.body.firstChild);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment