Mike Samuel f14e07636f
Cleanup some encoding and content generation issues
*  Match "mailto:" case-insensitively
*  Decode mailto: param to properly handle email addresses that contain
   non-ASCII characters.
*  Encode email address before crafting mailto: URL so that emails that
   contain '#' work properly and do not cut off URL parameters when later
   generating URLs for Gmail, Outlook, etc.
*  URL Encode email when generating URLs for Gmail, Outlook, etc. so
   that a crafted email address cannot specify extra parameters to those
   services.
*  Don't append '?' to outlook email address.
*  Rename encrypt to encode since "encrypt" implies hard-to-reverse
   which btoa is not.
*  Assign to textContent instead of innerHTML to make it obvious to
   security linters that the library does not use XSS-risky patterns.
2019-05-10 09:52:21 -04:00
2019-05-07 16:32:04 +02:00
2019-05-05 22:18:53 +02:00
2019-05-09 10:07:35 +02:00
2019-05-09 21:34:32 +02:00
2019-05-10 15:24:12 +02:00

💌 mailgo - a different mailto (WIP)

mailgo screencast (see it in action! https://mailgo.js.org)

what?

mailgo will substitute all the mailto: links with the mailgo modal

mailgo.min.js size

mailgo modal

installation

add at the end of the <body>

<body>
...
<script src="https://unpkg.com/mailgo@0.2.6/dist/mailgo.min.js"></script>
</body>

you can also import mailgo in <head> using defer

<head>
...
<script src="https://unpkg.com/mailgo@0.2.6/dist/mailgo.min.js" defer></script>
</head>

(note: the GitHub /dist is totally unstable, use unpkg or npm to test mailgo, thanks!)


usage

default

by default all the mailto: links will be enabled with mailgo only importing the script!

(and with the default usage in the modal will appear also cc, bcc, subject and body parameter if provided)

Do you want to prevent the spam? Use a no-spam usage instead the default usage

<a href="#mailgo" data-address="matteo" data-domain="manzinello.dev">write me!</a>

  • add href="#mailgo" to <a>
  • add data-address and data-domain to re-create your email address

no-spam usage #2

<a class="mailgo" data-address="matteo" data-domain="manzinello.dev">write me!</a>

  • add class="mailgo" to <a>
  • add data-address and data-domain to re-create your email address

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>

NPM

https://mailgo.js.org

Description
No description provided
Readme 17 MiB
2020-10-30 22:16:14 +00:00
Languages
JavaScript 79.5%
CSS 14.1%
HTML 6.4%