gulp
This commit is contained in:
parent
5207390f71
commit
4a402b1871
25
dist/mailgo.js
vendored
25
dist/mailgo.js
vendored
@ -155,9 +155,6 @@ mailgoInit = () => {
|
|||||||
// add the modal at the end of the body
|
// add the modal at the end of the body
|
||||||
document.body.appendChild(modal);
|
document.body.appendChild(modal);
|
||||||
|
|
||||||
// add the event mailgoKeydown on mailgo
|
|
||||||
mailgo.addEventListener("keydown", mailgoKeydown, false);
|
|
||||||
|
|
||||||
// every click outside the modal will hide the modal
|
// every click outside the modal will hide the modal
|
||||||
modalBackground.addEventListener("click", hideMailgo, false);
|
modalBackground.addEventListener("click", hideMailgo, false);
|
||||||
};
|
};
|
||||||
@ -208,6 +205,12 @@ mailgoRender = mailgo => {
|
|||||||
"@" +
|
"@" +
|
||||||
mailgo.getAttribute("data-cc-domain");
|
mailgo.getAttribute("data-cc-domain");
|
||||||
|
|
||||||
|
// bcc = data-bcc-address + @ + data-bcc-domain
|
||||||
|
bcc =
|
||||||
|
mailgo.getAttribute("data-bcc-address") +
|
||||||
|
"@" +
|
||||||
|
mailgo.getAttribute("data-bcc-domain");
|
||||||
|
|
||||||
// subject = data-subject
|
// subject = data-subject
|
||||||
subject = mailgo.getAttribute("data-subject");
|
subject = mailgo.getAttribute("data-subject");
|
||||||
|
|
||||||
@ -218,8 +221,9 @@ mailgoRender = mailgo => {
|
|||||||
// validate the email address
|
// validate the email address
|
||||||
if (!validateEmail(mail)) return;
|
if (!validateEmail(mail)) return;
|
||||||
|
|
||||||
// if cc is not valid cc = ""
|
// if cc, bcc is not valid cc, bcc = ""
|
||||||
if (!validateEmail(cc)) cc = "";
|
if (!validateEmail(cc)) cc = "";
|
||||||
|
if (!validateEmail(bcc)) bcc = "";
|
||||||
|
|
||||||
// information
|
// information
|
||||||
titleEl = getE("mailgo-title");
|
titleEl = getE("mailgo-title");
|
||||||
@ -379,11 +383,18 @@ copyToClipboard = str => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// show the modal
|
// show the modal
|
||||||
showMailgo = () => (getE("mailgo").style.display = "flex");
|
showMailgo = () => {
|
||||||
|
getE("mailgo").style.display = "flex";
|
||||||
|
// add mailgoKeydown
|
||||||
|
document.body.addEventListener("keydown", mailgoKeydown, false);
|
||||||
|
};
|
||||||
|
|
||||||
// hide the modal
|
// hide the modal
|
||||||
hideMailgo = () => (getE("mailgo").style.display = "none");
|
hideMailgo = () => {
|
||||||
|
getE("mailgo").style.display = "none";
|
||||||
|
// remove mailgoKeydown
|
||||||
|
document.body.removeEventListener("keydown", mailgoKeydown, false);
|
||||||
|
};
|
||||||
// decrypt email
|
// decrypt email
|
||||||
mailToEncoded = encoded => (window.location.href = MAILTO + atob(encoded));
|
mailToEncoded = encoded => (window.location.href = MAILTO + atob(encoded));
|
||||||
|
|
||||||
|
2
dist/mailgo.min.js
vendored
2
dist/mailgo.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user