Show branch in title

This commit is contained in:
Kevin van Zonneveld 2015-11-17 11:36:23 +01:00
parent 30777230ea
commit 322cfc0c1d

View file

@ -1,9 +1,22 @@
<html>
<head>
<title>
If you see this, JavaScript threw an error
</title>
</head>
<body>
<h1>
If you see this, JavaScript threw an error
</h1>
</body>
<script src="./transloadit-js-client.js"></script>
<script>
var branch = location.pathname.split('/')[2];
var elTitle = document.querySelector('title');
var elH1 = document.querySelector('h1');
var title = 'You are reviewing the latest push of branch: ' + branch;
elTitle.innerHTML = title;
elH1.innerHTML = title;
</script>
</html>