https://github.com/indr/arobase
Simple and lightweight email obfuscator library for modern browsers
https://github.com/indr/arobase
Last synced: 2 months ago
JSON representation
Simple and lightweight email obfuscator library for modern browsers
- Host: GitHub
- URL: https://github.com/indr/arobase
- Owner: indr
- License: mit
- Created: 2015-05-26T04:47:09.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-26T04:54:39.000Z (almost 10 years ago)
- Last Synced: 2025-01-30T11:25:26.347Z (4 months ago)
- Language: JavaScript
- Homepage: http://jexhson.github.io/arobase/
- Size: 122 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Arobase
http://jexhson.github.io/arobase/
Arobase is a simple and lightweight email obfuscator library for modern browsers.
It tries to obfuscate email addresses on a web page from bots but keep it
readable for human: transform characters into HTML numbers and insert random
padding (non printable characters) between letters. By default it also append
the page hostname to the address.## Basic Usage
Before you try anything, you need to include `arobase.min.js` in your page, via the usual tags:
~~~html
~~~
Then you can obfuscate an email address by simply adding a class `arobase` to an element:
~~~html
john.doe
~~~This will render a clickable email like `john.doe@`.
Arobase is also available via `npm` and `bower`.
## Options
Options are set using HTML attributes (such as `data-host`). All options can be
combined together.### Mailbox
To customize the mailbox (the part before `@`) just add a `data-mailbox`. It
allows you to set a custom text if JavaScript is disable.~~~html
Oops JS not activated
~~~This will render as previously.
### Domain
To set a custom domain (the part just after `@` but before the last `.`) just
add a `data-domain`.~~~html
john.doe
~~~This will render an email like `john.doe@example.`.
If current page have not top level domain (like `localhost`), the dot and the
tld parts are skipped.### Top level domain (tld)
To set a custom top level domain (like `.com` or `.net`) just add a `data-tld`.
~~~html
john.doe
~~~This will render an email like `[email protected]`.
## License
Arobase is released under the MIT License. See [LICENSE][1] file for
details.## Links
The official site for the library is at .
[1]: https://github.com/jexhson/arobase/blob/master/LICENSE