So, i am building a game with html5 and javascript and I want to prevent cheating by calling some of my functions(for example saveScore(100000)) from the console in web browser.
Any ideas how can i prevent this?
So, i am building a game with html5 and javascript and I want to prevent cheating by calling some of my functions(for example saveScore(100000)) from the console in web browser.
Any ideas how can i prevent this?
console are execute by the function eval()
so override the eval function by:
window.eval=function(){};
Now console is disabled
But this is also not good idea because it cannot prevent the execution of bookmarklet so use @Anthony's idea.