gestione migliore delle funzioni con arrow function

This commit is contained in:
Matteo Manzinello 2019-05-09 09:58:49 +02:00
parent b00bd27776
commit 8a819321bb

View File

@ -186,7 +186,7 @@ mailgoInit = () => {
event => {
copyToClipboard(mail);
copy.innerHTML = "copied";
let timeout = setTimeout(() => {
setTimeout(() => {
copy.innerHTML = "copy";
}, 999);
},
@ -261,12 +261,7 @@ copyToClipboard = str => {
};
// decrypt email
function mailToEncoded(encoded) {
var address = atob(encoded);
window.location.href = "mailto:" + address;
}
mailToEncoded = encoded => (window.location.href = "mailto:" + atob(encoded));
// encrypt email
function encryptEmail(email) {
return btoa(email);
}
encryptEmail = email => btoa(email);