diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..a75e9b8 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +ishan569.com \ No newline at end of file diff --git a/app.js b/app.js index 1ed2869..382cb98 100644 --- a/app.js +++ b/app.js @@ -8,6 +8,8 @@ let answer = document.getElementById("ans"); let clickOperator = 0; let percent = false; let numPercent = 0; +let colors = ['#EF2D4F', 'pink', 'blue', 'skyblue']; +let currentColor = 0; // this chunk of code is contributed by tushartiwari7 document.onkeyup = function(e) { if (e.which == 48 || e.keyCode == 96) { @@ -100,5 +102,13 @@ function equals(){ ans.value = 'Syntax Error'; } } - -//End \ No newline at end of file +function changeColor(){ + if(currentColor < colors.length-1) { + currentColor = currentColor+1; + document.body.style.backgroundColor = colors[currentColor]; + } else { + currentColor = 0; + document.body.style.backgroundColor = colors[0]; + } +} +//End diff --git a/style.css b/style.css index b36ee26..c4fd5c1 100644 --- a/style.css +++ b/style.css @@ -83,4 +83,9 @@ button:hover { .pink { background-color: #EF2D4F; color: white; -} \ No newline at end of file +} +.change-color-btn{ + border-radius: 10px; + width: 80%; + margin: 5px; +}