esport default mailgo
This commit is contained in:
parent
83472abeee
commit
b5000f476f
2
dist/mailgo.min.js
vendored
2
dist/mailgo.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
const mailgoVersion: string = "MAILGO_VERSION";
|
||||
|
||||
(() => {
|
||||
const mailgo = () => {
|
||||
// links
|
||||
const MAILTO: string = "mailto:";
|
||||
const TEL: string = "tel:";
|
||||
@ -750,9 +750,6 @@ const mailgoVersion: string = "MAILGO_VERSION";
|
||||
return by;
|
||||
};
|
||||
|
||||
// window exists
|
||||
const windowExists = () => window && typeof window !== "undefined";
|
||||
|
||||
// create element
|
||||
const createElement = (element: string = "div") =>
|
||||
document.createElement(element);
|
||||
@ -827,11 +824,8 @@ const mailgoVersion: string = "MAILGO_VERSION";
|
||||
// start mailgo
|
||||
(() => {
|
||||
// if the window object exists...
|
||||
if (windowExists()) {
|
||||
// mailgo style (gulp)
|
||||
let mailgoCSS: HTMLStyleElement = <HTMLStyleElement>(
|
||||
createElement("style")
|
||||
);
|
||||
let mailgoCSS: HTMLStyleElement = <HTMLStyleElement>createElement("style");
|
||||
mailgoCSS.id = "mailgo-style";
|
||||
mailgoCSS.type = "text/css";
|
||||
mailgoCSS.appendChild(createTextNode(`MAILGO_STYLE`));
|
||||
@ -842,6 +836,11 @@ const mailgoVersion: string = "MAILGO_VERSION";
|
||||
|
||||
// event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered
|
||||
document.addEventListener("click", mailgoCheckRender);
|
||||
}
|
||||
})();
|
||||
})();
|
||||
};
|
||||
|
||||
if (window && typeof window !== "undefined") {
|
||||
mailgo();
|
||||
}
|
||||
|
||||
export default mailgo();
|
||||
|
Loading…
x
Reference in New Issue
Block a user