react-obfuscated-mailto
v0.1.0
Published
React component for embedding a mailto link without it being scrapable by crawlers.
Downloads
5
Readme
React Obfuscated Mailto
A simple component to embed a mailto link while keeping the email hidden from crawlers. The component accepts a base64 encoded email string and will show a loading indicator for a couple of seconds before replacing it with the real decoded email. This way even a crawler with JavaScript enabled can't crawl the email address unless it waits for a given amount of time.
Usage: (first import import ObfuscatedMailto from "react-obfuscated-mailto";
)
<ObfuscatedMailto base64Email="Zm9vQGV4YW1wbGUuY29t" />
// Renders '[email protected]' after 5 seconds.
The loading time can be customized using the loadingTime
prop, such as the following:
<ObfuscatedMailto loadingTime={20} base64Email="Zm9vQGV4YW1wbGUuY29t" />