svelte-hidden-email Svelte Themes

Svelte Hidden Email

Obfuscate email addresses from bots

svelte-hidden-email

Obfuscate email addresses from bots in your svelte project

Installation šŸ”§

First you need a Svelte 3 project. Its starter template lives at https://github.com/sveltejs/template.

Then install the component by running the following command in your project's directory:

npm install svelte-hidden-email

Features ā¤

  • Zero dependencies!
  • Protects you from 99.9% of scrapping bots
  • Renders an empty standard <a> tag

How to use šŸš€

  1. First import the component on your svelte page's script section.
import HiddenEmail from 'svelte-hidden-email/src/index.js'
  1. Call the component where you want it to be placed e.g.:
<HiddenEmail to="[email protected]" title="Send us an email" />

If you input an invalid email address nothing will be rendered and a console error will be produced.

How it works šŸ”®

The email is rendered inside a CSS psuedo-element leaving the <a> tag empty.

The Cons āŒ

  • Bots that do OCR can still scrap emails hidden with this trick

Contribution šŸ–‡ļø

Feel free to fork. If you find a bug or got something great to add make a pull request!

Authors āœ’ļø

  • ** John Rallis ** - * Initial Work * - rallisf1

You can also look at the list of all the contributors who have participated in this project.

License šŸ“„

This project is free to use, edit & distribute under the GNU GPLv3 License.

Expressions of Gratitude šŸŽ

  • Tell others about this project šŸ“¢
  • Buy me a beer šŸŗ or coffee ā˜• | ā‚æ Crypto |šŸ’° Cash
  • Publicly thanks šŸ¤“

āŒØļø with ā¤ļø by rallisf1 šŸ˜Š

Top categories

Loading Svelte Themes