Home

tests coverage maintainability

js.mail.deobfuscate

ES6 class, module and jQuery Plugin which deobfuscate rot13 caesar cipher encoded links.

npm

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 'js.mail.deobfuscate';

const elements = document.querySelectorAll('a[href="mailto:"]');
elements.forEach(function(element) {
  element.addEventListener('click', function(event) {
    mailDeobfuscate(event.target);
  });
});

Documentation

jquery.mail.deobfuscate.js

mail.deobfuscate.class.js

mail.deobfuscate.module.js