Reefer
Junior Member
- Jan 3, 2010
- 195
- 72
I wanted to hide the source from people viewing my page on it (since they could just view the source to see the links I was providing them with, which were only meant to be seen if an offer was complete). With a little research, I've figured out an easy way to accomplish this (at least to the point where it becomes easier to do the survey or leave the site rather than decrypting).
Step 1: write your html code
Step 2: replace all single quotes (') with escaped single quotes (\')
Step 3: copy the html code you want cloaked.
go to online js obfuscator
and enter in your html code with the following addition:
(add document.write' before the html and '); afterwords)
and press "Obfuscate It!"
Step 4: copy the enrypted code to a new file called "hidden.js" with the additional following code:
(Add <!-- before the encrypted code and --> afterwords)
Save the file.
Step 5: in the actual html page, where you want your encrypted html to show up, enter:
Step 6: upload both files to the same directory.
Have fun.
Step 1: write your html code
Step 2: replace all single quotes (') with escaped single quotes (\')
Step 3: copy the html code you want cloaked.
go to online js obfuscator
Code:
http://www.daftlogic.com/projects-online-javascript-obfuscator.htm
Code:
<!--
document.write('YOURHTMLCODE');
-->
and press "Obfuscate It!"
Step 4: copy the enrypted code to a new file called "hidden.js" with the additional following code:
Code:
<!--
ENCRYPTEDCODEHERE
-->
Save the file.
Step 5: in the actual html page, where you want your encrypted html to show up, enter:
Code:
<script text="text/javascript" src="hidden.js"></script>
Have fun.