Step 5: Use the javascript encoding and pick the double-escaped encoding or the substitution encoding
Step 6: Encode
Copy the generated Javascript code into whatever you need it (notepad,
your web page editor, etc.). Remove some lines from the top and bottom.
It should look similar to one of these.
Alter the last line and remove the document.write portion. Add a
"return" line after your modified last line. Put this in a function.
The script should now look like one of these.