inizio di modifiche README, not anche a mailgo senza mailto

This commit is contained in:
Matteo Manzinello 2019-05-06 19:13:20 +02:00
parent 69bc1f2155
commit c29446663f
2 changed files with 13 additions and 17 deletions

View File

@ -1,27 +1,15 @@
# 💌 mailgo - a different mailto # 💌 mailgo - a different mailto (WIP)
![mailgo screencast](/assets/video/mailgo-v.0.1.2-screencast.gif) ![mailgo screencast](/assets/video/mailgo-v.0.1.2-screencast.gif)
(see it in action! <https://mailgo.js.org>) (see it in action! <https://mailgo.js.org>)
<u>mailgo is WIP</u> ## what?
add the mailgo script in a web page to substitute all the `mailgo:` links with the **mailgo modal** mailgo will substitute all the `mailto:` links with the **mailgo modal**
<img src="assets/img/screen-1.png" alt="mailgo modal" width="200"/> <img src="assets/img/screen-1.png" alt="mailgo modal" width="200"/>
to exclude a mailto link add to the `<a>` element the class `no-mailgo` like in this example: ## installation
```
<a class="no-mailgo" href="mailto:matteo@manzinello.dev">matteo@manzinello.dev</a>
```
## script (development)
```
<script src="https://cdn.jsdelivr.net/gh/manzinello/mailgo@latest/dist/mailgo.min.js"></script>
```
## script
``` ```
<script src="https://cdn.jsdelivr.net/npm/mailgo/dist/mailgo.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/mailgo/dist/mailgo.min.js"></script>
@ -41,6 +29,14 @@ or
specifying `[VERSION]` specifying `[VERSION]`
### exclude a mailto
to exclude a mailto link add to the `<a>` element the class `no-mailgo` like in this example:
```
<a class="no-mailgo" href="mailto:matteo@manzinello.dev">matteo@manzinello.dev</a>
```
## docs ## docs
<https://mailgo.js.org> <https://mailgo.js.org>

View File

@ -91,7 +91,7 @@ function mailgoInit() {
// ottengo tutti i mailto contenuti nella pagina // ottengo tutti i mailto contenuti nella pagina
const mailgos = document.querySelectorAll( const mailgos = document.querySelectorAll(
'a[href^="mailto:"]:not(.no-mailgo), a.mailgo' 'a[href^="mailto:"]:not(.no-mailgo), a.mailgo:not(.no-mailgo)'
); );
// attivo mailgo su tutti gli elementi // attivo mailgo su tutti gli elementi