Skip to content

Instantly share code, notes, and snippets.

@faller222
Last active April 20, 2020 01:42
Show Gist options
  • Save faller222/a4c568c51126b811e0e8358e4342a22a to your computer and use it in GitHub Desktop.
Save faller222/a4c568c51126b811e0e8358e4342a22a to your computer and use it in GitHub Desktop.
Codigo JS para ejecutar el test de memoria, debe ser lanzado cuando la cuenta regresiva aparece https://zzzscore.com/memory/en/
setInterval(function(){
if($(".count").length==0){
var grid = $(".grid.x4").get(0);
var boxes = grid.getElementsByClassName("fa");
var classes=[];
for(var i=0;i<boxes.length ;i++){
var className = boxes[i].classList[1];
if(classes.lastIndexOf(className)==-1){
classes.push(className)
}
}
for(var i=0;i<8;i++){
$("."+classes[i]).trigger("tap")
}
}},80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment