From 74b0961d3065a470540143bfc78146e0b868634f Mon Sep 17 00:00:00 2001 From: Matteo Manzinello Date: Thu, 2 May 2019 10:57:51 +0200 Subject: [PATCH] aggiunti commenti --- src/mailgo.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mailgo.js b/src/mailgo.js index 4aa6fb1..b9ab741 100644 --- a/src/mailgo.js +++ b/src/mailgo.js @@ -16,7 +16,10 @@ mailtos.forEach(mailto => { mailto.addEventListener( "click", event => { + // blocco l'esecuzione normale del mailto: event.preventDefault(); + + // mostro un alert let r = confirm("You have clicked mailto: " + mailto.href); if (r === true) { location.href = mailto.href;