more export
This commit is contained in:
@@ -553,7 +553,7 @@ var mailgo_mailgoInit = function mailgoInit() {
|
||||
*/
|
||||
|
||||
|
||||
var mailgoRender = function mailgoRender() {
|
||||
function mailgoRender() {
|
||||
var _config7;
|
||||
|
||||
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : MAIL_TYPE;
|
||||
@@ -586,8 +586,7 @@ var mailgoRender = function mailgoRender() {
|
||||
subject = mailgoElement.getAttribute("data-subject"); // body = data-body
|
||||
|
||||
bodyMail = mailgoElement.getAttribute("data-body");
|
||||
} // TODO test this
|
||||
|
||||
}
|
||||
|
||||
if (typeof ((_config5 = config) === null || _config5 === void 0 ? void 0 : _config5.validateEmail) === "undefined" || ((_config6 = config) === null || _config6 === void 0 ? void 0 : _config6.validateEmail) === true) {
|
||||
// validate the email address
|
||||
@@ -670,8 +669,7 @@ var mailgoRender = function mailgoRender() {
|
||||
showMailgo(type); // add listener keyDown
|
||||
|
||||
document.addEventListener("keydown", mailgoKeydown);
|
||||
}; // actions
|
||||
|
||||
} // actions
|
||||
|
||||
var openGmail = function openGmail() {
|
||||
// Gmail url
|
||||
@@ -754,7 +752,7 @@ var copy = function copy(content) {
|
||||
}; // function that returns if an element is a mailgo
|
||||
|
||||
|
||||
var isMailgo = function isMailgo(element) {
|
||||
function isMailgo(element) {
|
||||
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : MAIL_TYPE;
|
||||
var href = element.href; // mailgo type mail
|
||||
|
||||
@@ -776,7 +774,7 @@ var isMailgo = function isMailgo(element) {
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* mailgoCheckRender
|
||||
* function to check if an element is mailgo-enabled or not referencing to
|
||||
@@ -794,8 +792,7 @@ var isMailgo = function isMailgo(element) {
|
||||
* );
|
||||
*/
|
||||
|
||||
|
||||
var mailgoCheckRender = function mailgoCheckRender(event) {
|
||||
function mailgoCheckRender(event) {
|
||||
// check if the id=mailgo exists in the body
|
||||
if (!document.contains(modalMailto) || !document.contains(modalTel)) return false; // if a mailgo is already showing do nothing
|
||||
|
||||
@@ -826,13 +823,12 @@ var mailgoCheckRender = function mailgoCheckRender(event) {
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* mailgoKeydown
|
||||
* function to manage the keydown event when the modal is showing
|
||||
*/
|
||||
|
||||
|
||||
var mailgoKeydown = function mailgoKeydown(keyboardEvent) {
|
||||
// if mailgo is showing
|
||||
if (mailgoIsShowing(MAIL_TYPE)) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user