Socket
Socket
Sign inDemoInstall

jquery-spamguard

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jquery-spamguard

🤖 Protect your email address from getting crawled by spam bots.


Version published
Weekly downloads
5
decreased by-16.67%
Maintainers
1
Install size
1.27 MB
Created
Weekly downloads
 

Readme

Source

jQuery Spam Guard

Installation

npm install jquery-spamguard
yarn add jquery-spamguard

Usage

$(selector).spamguard();
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery-spamguard/dist/jquery.spamguard.js"></script>

<a href="#" class="protect-me" data-name="mark" data-domain="gmail" data-tld="com"></a>

<script>
   $(function(){
      $(".protect-me").spamguard();
   });
</script>

Demo

Options

AttributeType DefaultDescription
data-namestringEverything before the @ of your email address
data-domainstringDomain name without extension
data-tldstringExtension without .
data-numberstringYou can add letters and special characters for obfuscation (see example)
data-mailtobooleanfalseCreates a mailto:-link
data-contentbooleanfalseWhen true, your own content will be kept. Otherwise it returns the email address.
data-subjectstringSet a custom subject for mailto:-link
data-messagestringSet a custom message for mailto:-link
------------
data-textstring
data-remove-thisstring

Example with custom content

<a href="#" class="protect-me" data-name="mark" data-domain="gmail" data-tld="com" data-content="true" data-mailto="true">
   <i class="fa fa-heart"></i>
</a>
<script>
   $(".protect-me").spamguard();
</script>

Example with phone number

<a href="#" class="protect-me" data-number="_+1 %&80#8 !555;; 01qY@@23" data-mailto="true"></a>
<script>
   $(".protect-me").spamguard();
</script>

Example with a custom text

<a href="#" class="protect-me" data-text="H$e__l-[l].o ::W=o)r%&%ld.!" data-remove-this="§$%&/()=_:;.-[]"></a>
<script>
   $(".protect-me").spamguard();
</script>

Keywords

FAQs

Last updated on 03 Jan 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc