Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-obfuscate

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-obfuscate - npm Package Compare versions

Comparing version 3.4.0 to 3.5.0-0

17

dist/obfuscate.js

@@ -92,11 +92,14 @@ "use strict";

value: function handleClick(event) {
var onClick = this.props.onClick;
event.preventDefault(); // Allow instantiator to provide an onClick method to be called
// before we change location (e.g. for analytics tracking)
var onClick = this.props.onClick; // If focused or hovered, this js will be skipped with preference for html
if (onClick && typeof onClick === 'function') {
onClick();
if (this.state.humanInteraction === false) {
event.preventDefault(); // Allow instantiator to provide an onClick method to be called
// before we change location (e.g. for analytics tracking)
if (onClick && typeof onClick === 'function') {
onClick();
}
window.location.href = this.createContactLink(this.props);
}
window.location.href = this.createContactLink(this.props);
}

@@ -103,0 +106,0 @@ }, {

{
"name": "react-obfuscate",
"version": "3.4.0",
"version": "3.5.0-0",
"description": "An intelligent React component to obfuscate any contact link",

@@ -55,3 +55,3 @@ "main": "dist/obfuscate.js",

"react-test-renderer": "^16.8.5",
"react-window-ui": "^1.1.1"
"react-window-ui": "^2.1.0"
},

@@ -58,0 +58,0 @@ "jest": {

@@ -73,17 +73,23 @@ # react-obfuscate

## Options
## Common Options
| Prop | Type | Argument | Default | Description |
| --------- | ----------- | ------------ | ------------ | -------------------------------------------------------------- |
| email | `string` | `<optional>` | `null` | email address of the intended recipient |
| tel | `string` | `<optional>` | `null` | telephone number of the intended recipient |
| sms | `string` | `<optional>` | `null` | sms number of the intended recipient |
| facetime | `string` | `<optional>` | `null` | facetime address of the intended recipient |
| href | `string` | `<optional>` | `null` | Obfuscate any other URL type |
| headers | `object` | `<optional>` | `null` | subject, cc, bcc, body, etc |
| obfuscate | `boolean` | `<optional>` | `true` | set to false to disable obfuscation |
| linkText | `string` | `<optional>` | `obfuscated` | add custom pre-interaction href attribute placeholder text |
| element | `string` | `<optional>` | `'a'` | custom element to render instead of an `a` tag |
| onClick | `function` | `<optional>` | `null` | called prior to setting location (e.g. for analytics tracking) |
| Prop | Type | Argument | Default | Description |
| -------- | -------- | ---------- | ------- | -------------------------------------------- |
| email | `string` | `optional` | `null` | email address of the intended recipient |
| headers | `object` | `optional` | `null` | subject, cc, bcc, body, etc |
| tel | `string` | `optional` | `null` | telephone number of the intended recipient |
| sms | `string` | `optional` | `null` | sms number of the intended recipient |
| facetime | `string` | `optional` | `null` | facetime address of the intended recipient |
| href | `string` | `optional` | `null` | Obfuscate any other URL type (e.g. WhatsApp) |
## Uncommon Options
| Prop | Type | Argument | Default | Description |
| --------- | ---------- | ---------- | ------------ | -------------------------------------------------------------- |
| linkText | `string` | `optional` | `obfuscated` | add custom pre-interaction href attribute placeholder text |
| obfuscate | `boolean` | `optional` | `true` | set to false to disable obfuscation |
| element | `string` | `optional` | `'a'` | use if you want to override the default `a` tag |
| onClick | `function` | `optional` | `null` | called prior to setting location (e.g. for analytics tracking) |
## Development

@@ -90,0 +96,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc