Skip to content

Instantly share code, notes, and snippets.

@MrPowerGamerBR
Created August 2, 2015 22:52
Show Gist options
  • Save MrPowerGamerBR/b7c5984edd8f6922aa5b to your computer and use it in GitHub Desktop.
Save MrPowerGamerBR/b7c5984edd8f6922aa5b to your computer and use it in GitHub Desktop.
Verifica um arquivo JSON em JavaScript, uso isto para poder verificar o status do meu Servidor via Tasker.
var arr = JSON.parse(global("HTTPD"));
setLocal("beforethestorm", global("MineStatus"));
setGlobal("MineStatus", false);
if (arr.status == true) {
setGlobal("MineStatus", true);
} else {
setGlobal("MineStatus", false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment