Skip to content

Commit

Permalink
remove unecessary Update function
Browse files Browse the repository at this point in the history
  • Loading branch information
EdoanR committed Jun 30, 2022
1 parent 2ed926e commit 02e90d2
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,34 +72,6 @@ function OnInputChange(byButton = false) {
localStorage.setItem('goodValue', goodValue);
}

function Update() {
let seed = seedInput.value;

let amount = parseInt(amountInput.value);
if (!amount && amount !== 0) amount = 100;

HandleUpdateButtonVisibility(amount);

let goodValue = parseFloat(goodValueInput.value);
if (!goodValue && goodValue !== 0) goodValue = 2;

if (amount < 800) {
GetChain(seed, amount, goodValue);
} else {
clearTimeout(timeout);
loadingDiv.innerHTML = 'Loading...';
timeout = setTimeout(() => {
GetChain(seed, amount, goodValue);
loadingDiv.innerHTML = '';
}, 500);
}

UpdateSelectionWindow();

localStorage.setItem('amount', amount);
localStorage.setItem('goodValue', goodValue);
}

function GetChain(seed, amount = 1000, goodValue = 2) {
resultsDiv.innerHTML = '';

Expand Down

0 comments on commit 02e90d2

Please sign in to comment.