Skip to content

Instantly share code, notes, and snippets.

@princerachit
Last active January 3, 2020 17:30
Show Gist options
  • Save princerachit/d37584d2ba30280a26f62010da37d660 to your computer and use it in GitHub Desktop.
Save princerachit/d37584d2ba30280a26f62010da37d660 to your computer and use it in GitHub Desktop.
curVal = localStorage.getItem("curVal");
if(curVal==null){
curVal = 0
}
curVal++
t = curVal+""
if(t.length < 6){
for(k=0;k<5;k++){
t = "0"+t
}
}
console.log(curVal)
localStorage.setItem("curVal", curVal);
document.getElementById('recovery_code_entry').value = t
document.getElementById("u_0_9").submit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment