Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalpanchal authored Nov 17, 2019
1 parent bcf5521 commit 6c53e67
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
<body>
<script>
const color = window.location.href.split('/').reverse()[0];
document.getElementsByTagName("BODY")[0].style.background = color;
document.title = `color:${color}`;
const bodyEle = document.getElementsByTagName("BODY")[0];
const h1Ele = document.getElementsByTagName("h1")[0];

bodyEle.style.background = color;
document.title = `color:${color}`;
h1Ele.innerHTML = color;
h1Ele.style.color = 'white';
</script>
<h1></h1>
</body>
</html>

0 comments on commit 6c53e67

Please sign in to comment.