Answer the question
In order to leave comments, you need to log in
How to protect JS code?
I have JavaScript code. It can be viewed by viewing the element's code. But I want to hide it so that it can't be done. Or that when you open it there was just a set of characters that is not clear to a person.
How to implement it?
Answer the question
In order to leave comments, you need to log in
It won’t work to hide, but it’s quite difficult to read a little. For example, using obfuscation . But be prepared to increase the amount of code.
For example console.log('Лол, кек, чебурек');
, turn into
var _0xac52=["\u041B\u043E\u043B\x2C\x20\u043A\u0435\u043A\x2C\x20\u0447\u0435\u0431\u0443\u0440\u0435\u043A","\x6C\x6F\x67"];console[_0xac52[1]](_0xac52[0])
. Do you need it? IMHO all this is kindergarten.
Don't sweat it, I think. Judging by the toaster, there are a lot of questions like how to do it the same way as here on the site. Those. rather than open the code and see go compose questions. Not to mention reading the API documentation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question