Hacker News new | ask | show | jobs
by joshwprinceton 5247 days ago
is there a way I could have disabled that?
1 comments

Of course. Give the numbers a randomly generated id, and check for the winning value server side. You'd also want display the numbers in a way where it's tougher to compare them than checking the text values--the target value is $('#left h1').text().trim(). So that means using images (not named 1.jpg!) or canvas or something like that.

Also, your app is vulnerable to replay. I can keep POSTing the same request over and over and my score increases.

As it is now, you don't even need to match the numbers. Just find the form and submit it. $("#right form").submit()