The packing algorithm is forgiving of all forms of JavaScript with one exception. You must correctly terminate
all JavaScript statements with semi-colons. This also includes
function declarations.
Here is an example of correct, semi-colon terminated, JavaScript:
// sample code
var input, output;
// notice the semi-colon at the END of function declarations
onload = function() {
input = document.getElementById("input");
output = document.getElementById("output");
clearAll(true);
};
function obfuscateScript() {
output.value = obfuscate(input.value);
};
function clearAll(focus) {
output.value = input.value = "";
// the "if" statement is NOT terminated with a semi-colon
if (focus) {
input.focus();
}
};