gestione migliore delle funzioni con arrow function
This commit is contained in:
parent
b00bd27776
commit
8a819321bb
@ -186,7 +186,7 @@ mailgoInit = () => {
|
|||||||
event => {
|
event => {
|
||||||
copyToClipboard(mail);
|
copyToClipboard(mail);
|
||||||
copy.innerHTML = "copied";
|
copy.innerHTML = "copied";
|
||||||
let timeout = setTimeout(() => {
|
setTimeout(() => {
|
||||||
copy.innerHTML = "copy";
|
copy.innerHTML = "copy";
|
||||||
}, 999);
|
}, 999);
|
||||||
},
|
},
|
||||||
@ -261,12 +261,7 @@ copyToClipboard = str => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// decrypt email
|
// decrypt email
|
||||||
function mailToEncoded(encoded) {
|
mailToEncoded = encoded => (window.location.href = "mailto:" + atob(encoded));
|
||||||
var address = atob(encoded);
|
|
||||||
window.location.href = "mailto:" + address;
|
|
||||||
}
|
|
||||||
|
|
||||||
// encrypt email
|
// encrypt email
|
||||||
function encryptEmail(email) {
|
encryptEmail = email => btoa(email);
|
||||||
return btoa(email);
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user