Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noerw/gitbook-plugin-scramble-mailto
gitbook plugin scrambling mailto links to avoid spambots
https://github.com/noerw/gitbook-plugin-scramble-mailto
Last synced: 9 days ago
JSON representation
gitbook plugin scrambling mailto links to avoid spambots
- Host: GitHub
- URL: https://github.com/noerw/gitbook-plugin-scramble-mailto
- Owner: noerw
- License: lgpl-3.0
- Created: 2016-07-23T11:30:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-23T16:52:37.000Z (over 8 years ago)
- Last Synced: 2024-06-11T17:09:55.671Z (5 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitbook-plugin-scramble-mailto
This gitbook plugin scrambles / obscures `mailto` links found in the book source.
Requires `gitbook >=3.1.0`.The email address may be obscured according to 2 methods, selectable in your `book.json`:
- `jsFunction`: opens a on the fly generated mailto link via javascript (default)
- `htmlEncode`: replaces the email address with a randomly encoded versionCurrently the filter applies to any ``-tag with a `mailto:` in the href.
If you write the email not only in the `href` but also in the rendered text of an anchor, a safe replacement is not guaranteed.
## usage
1. add the plugin to your `book.json`, and optionally configure it. example:
```
{
"gitbook": "3.1.0",
"plugins": [ "scramble-mailto"],
"scramble-mailto": {
"scrambleMethod": "htmlEncode" // optional, defaults to "jsFunction"
}
}
```2. run `gitbook install`
3. hopefully stay safe from spambots ;)
## license
LGPL-3.0