@livenetworks/ln-obfuscator
v1.0.1
Published
Plain JavaScript Component. Obfuscate email, telephone number, any personal data from spam crawlers without writing single line of JavaScript.
Downloads
5
Readme
LiveNetworks Obfuscator Component
Plain Javascript Component. Not needed any additional libraries, frameworks.
- Speed up your web site by loading non blocking javascript with defer atrribute;
- Keep your e-mail, telephone number, address... any other personal data from spam crawlers;
- It works even with dynamically (javascript/ajax) generated elements;
- Not needed to write single line of javascript to initialize it;
Usage
Create obfuscated string
Load script into .html
<script src="ln-obfuscator.js" defer></script>
In the console:
window.lnObfuscator.obfuscate(10, '<a href="mailto:[email protected]">[email protected]</a>');
Result:
<k rbop="wksvdy:[email protected]">[email protected]</k>
Your final html markup
<span ln-obfuscator="10">
<k rbop="wksvdy:[email protected]">[email protected]</k>
</span>
<script src="ln-obfuscator.js" defer></script>