Skip to content

Instantly share code, notes, and snippets.

@lccxx
Created October 17, 2016 06:36
Show Gist options
  • Save lccxx/533efc32e1e36b7862088f1ed9a4cadd to your computer and use it in GitHub Desktop.
Save lccxx/533efc32e1e36b7862088f1ed9a4cadd to your computer and use it in GitHub Desktop.
Telegram bot "Math Battle" cheat script
window.setInterval(function() { var vx = document.getElementById("task_x").innerText, op = { "+": "+", "–": "-", "×": "*", "/": "/" }[document.getElementById("task_op").innerText], vy = document.getElementById("task_y").innerText, res = document.getElementById("task_res").innerText, r_btn = document.getElementById("button_correct"), w_btn = document.getElementById("button_wrong"); console.log(vx, op, vy, res, r_btn, w_btn); if (eval(vx + op + vy) == res * 1) r_btn.click(); else w_btn.click() }, 500)
@ismaeilmohammadi
Copy link

hi Prof
where put this code in?

@Mhs-220
Copy link

Mhs-220 commented Mar 12, 2017

hi
you can put this code in your browser consol (Inspect Element)

@timomwa
Copy link

timomwa commented Apr 10, 2017

Can i still play Math battle on a browser ? Share the URL

@gda033
Copy link

gda033 commented Nov 14, 2020

How can you do this on an iPhone or and iPad ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment