working on new parameter: showFooter to hide or not the mailgo.dev in the footer of the modal
This commit is contained in:
parent
68e8b619d4
commit
a7c0f7e48c
|
@ -11,6 +11,7 @@ declare module "mailgo" {
|
||||||
forceLang?: boolean;
|
forceLang?: boolean;
|
||||||
validateEmail?: boolean;
|
validateEmail?: boolean;
|
||||||
validateTel?: boolean;
|
validateTel?: boolean;
|
||||||
|
showFooter?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type MailgoTranslation = {
|
export type MailgoTranslation = {
|
||||||
|
|
|
@ -261,7 +261,13 @@ const mailgoInit = (): void => {
|
||||||
|
|
||||||
modalContent.appendChild(copyMail);
|
modalContent.appendChild(copyMail);
|
||||||
|
|
||||||
modalContent.appendChild(byElement());
|
// show mailgo.dev in footer only if showFooter == true
|
||||||
|
if (
|
||||||
|
typeof config?.showFooter !== "undefined" &&
|
||||||
|
config?.showFooter === false
|
||||||
|
) {
|
||||||
|
modalContent.appendChild(byElement());
|
||||||
|
}
|
||||||
|
|
||||||
// add the modal at the end of the body
|
// add the modal at the end of the body
|
||||||
document.body.appendChild(modalMailto);
|
document.body.appendChild(modalMailto);
|
||||||
|
@ -385,7 +391,13 @@ const mailgoInit = (): void => {
|
||||||
|
|
||||||
modalContent.appendChild(copyTel);
|
modalContent.appendChild(copyTel);
|
||||||
|
|
||||||
modalContent.appendChild(byElement());
|
// show mailgo.dev in footer only if showFooter == true
|
||||||
|
if (
|
||||||
|
typeof config?.showFooter !== "undefined" &&
|
||||||
|
config?.showFooter === false
|
||||||
|
) {
|
||||||
|
modalContent.appendChild(byElement());
|
||||||
|
}
|
||||||
|
|
||||||
// add the modal at the end of the body
|
// add the modal at the end of the body
|
||||||
document.body.appendChild(modalTel);
|
document.body.appendChild(modalTel);
|
||||||
|
|
Loading…
Reference in New Issue