0.1.0 • Published 4 years ago
react-obfuscated-mailto v0.1.0
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 'foo@example.com' after 5 seconds.
The loading time can be customized using the loadingTime
prop, such as the following:
<ObfuscatedMailto loadingTime={20} base64Email="Zm9vQGV4YW1wbGUuY29t" />
0.1.0
4 years ago