I am planning on obfuscating my js code for this project.
I have multiple js files that I am planning on combining to one minified, obfuscated js file.
Now the question is, is there a way to change the HTML calls (such as onClick) to the obfuscated function names?
** example:
assume file main.js
before obfuscation
function functionName(){
//Do Something here
}
and assume index.html
as follows:
...
<button onClick="functionName()">
...
<script src="path/to/file/main.js"></script>
...
now file main.js
after obfuscation and minification:
function a(){//Do Something here}
now I need index.html
to call that function, is there a way to automate change of the onclick call from functionName()
to a()
during the obfuscation process in the index.html
file??
*** end example
if not, after everything is minified and obfuscated, how would I change it manually?
*Side note, right now I am considering using google's closure compiler.