js.mail.deobfuscate
ES6 class, module and jQuery Plugin which deobfuscate rot13 caesar cipher encoded links.
npm
npm install --save js.mail.deobfuscate
Example
jQuery plugin
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
<script src="../node_modules/js.mail.deobfuscate/dist/jquery.mail.deobfuscate.min.js"></script>
<script>
$('a[href^="mailto:"]').each(function (index, value) {
$(value).on('click', function(event) {
$(event.target).mailDeobfuscate()
})
})
</script>
ES6
import mailDeobfuscate from '../node_modules/js.mail.deobfuscate/dist/mail.deobfuscate.module';
const elements = document.querySelectorAll('a');
elements.forEach(function(element) {
element.addEventListener('click', function(event) {
mailDeobfuscate(event.target);
});
});