windowExists function fix
This commit is contained in:
parent
68920313c6
commit
e43f387097
File diff suppressed because one or more lines are too long
|
@ -34,7 +34,13 @@ function js() {
|
|||
.pipe(replace("MAILGO_VERSION", version))
|
||||
.pipe(replace("MAILGO_STYLE", cssMinContent))
|
||||
.pipe(babel())
|
||||
.pipe(uglify())
|
||||
.pipe(
|
||||
uglify({
|
||||
mangle: {
|
||||
keep_fnames: true // keep function names
|
||||
}
|
||||
})
|
||||
)
|
||||
.pipe(
|
||||
rename({
|
||||
suffix: ".min"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// @flow
|
||||
const V = "MAILGO_VERSION";
|
||||
|
||||
// window exists
|
||||
const windowExists = () => window && typeof window !== "undefined";
|
||||
|
||||
// links
|
||||
const MAILTO = "mailto:";
|
||||
const TEL = "tel:";
|
||||
|
@ -813,9 +815,6 @@ const encodeEmail = email => btoa(email);
|
|||
// getE shorthand
|
||||
const getE = id => document.getElementById(id);
|
||||
|
||||
// window exists
|
||||
const windowExists = () => window && typeof window !== "undefined";
|
||||
|
||||
// get display value
|
||||
const getDisplay = id => getE(id).style.display;
|
||||
|
||||
|
|
Loading…
Reference in New Issue