JEP is a simple JavaScript function that protects email addresses from bots scraping raw HTML. It dynamically writes obfuscated email links to the DOM.
✅ Obfuscates emails using HTML character codes
✅ Prevents basic scrapers from reading raw email addresses
✅ No manual decoding required – browsers display the email correctly
✅ Lightweight & simple – only a few lines of JavaScript
📂 jep-email-protection
│── 📄 index.html # Example usage
│── 📄 jep.js # JEP function
│── 📄 README.md # Documentation
Add jep.js
to your project and include it in your HTML:
<script src="jep.js"></script>
Use the jep_link
function to insert an email link:
<p>Contact: <script>jep_link("example.com", "mailbox")</script></p>
This dynamically generates:
<a href="mailto:[email protected]">[email protected]</a>
But in the HTML source, it appears obfuscated:
<a href="mailto:[email protected]">mailbox@example.com</a>
- Scrapers scanning raw HTML won’t see the email – only encoded characters.
- Browsers automatically decode the characters, displaying a normal email link.
- Users can click the email as usual, but bots won’t extract it easily.
- Add randomized obfuscation to make detection harder.
- Use JavaScript decryption for even stronger protection.
Feel free to improve the project and submit a pull request! 🚀