Skip to content

Commit

Permalink
Finished 10000
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny Hawk committed Mar 15, 2019
1 parent c256cf7 commit 0a1ad52
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
24 changes: 19 additions & 5 deletions js/tenthousand.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,25 @@ window.onblur = function() {

function Update()
{
if (counter === 0)
if (counter === 1)
{
if (!interacted)
{
counterElement.style = "pointer-events: auto;";
counterElement.innerHTML = "<a href='https://www.instagram.com/smalldogsbehindlargerobjects/'>Welcome</a>"
}
else
counterElement.innerHTML = "Done";
return;
} else if (counter === 9000 && !interacted)
{
counterElement.style = "color: #666666;"
} else if (counter === 5000 && !interacted)
{
counterElement.style = "color: #EEEEEE;"
} else if (counter === 1000 && !interacted)
{
counterElement.style = "color: #FFFFFF;"
}
counter--;
counterElement.innerHTML = counter;
Expand All @@ -49,9 +60,12 @@ function Reset()
var value = input.value;

if (value > 10000)
value = 10000
else if (value < 0)
value = 0;
{
interacted = false;
value = 10000;
}
else if (value < 1)
value = 1;

input.value = "";

Expand All @@ -71,7 +85,7 @@ function ClickedOther(event) {

function Clicked()
{
interacted = true;
interacted = false;
counter = 10000;
counterElement.innerHTML = counter;
}
2 changes: 1 addition & 1 deletion tenthousand.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="main">
<p id="counter">10000</p>
<form id="form" onsubmit="FormSubmit();return false" onclick="ClickedOther(event);">
<input id="input" type="number" min="1" max="10000">
<input id="input" type="number" min="1" max="10000" onkeydown="return event.keyCode !== 69">
</form>
</div>
</article>
Expand Down

0 comments on commit 0a1ad52

Please sign in to comment.