From 72f21edb8134d478a848a83f82e76d2369ad0d52 Mon Sep 17 00:00:00 2001 From: Matteo Manzinello Date: Fri, 25 Oct 2019 21:03:54 +0200 Subject: [PATCH] const, then vars --- src/mailgo.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/mailgo.js b/src/mailgo.js index fc944d9..6273a06 100644 --- a/src/mailgo.js +++ b/src/mailgo.js @@ -10,16 +10,9 @@ const CALLTO = "callto:"; const MAIL_TYPE = "mail"; const TEL_TYPE = "tel"; +// default href for links const DEFAULT_BTN_HREF = "javascript:void(0);"; -// mailgo style (gulp) -let mailgoCSS = document.createElement("style"); -mailgoCSS.id = "mailgo-style"; -mailgoCSS.type = "text/css"; -let mailgoCSSContent = document.createTextNode(`MAILGO_STYLE`); -mailgoCSS.appendChild(mailgoCSSContent); -document.head.appendChild(mailgoCSS); - // mailgo variables let url = "", mail = "", @@ -45,6 +38,14 @@ let gmailButton, callButton, copyButton; +// mailgo style (gulp) +let mailgoCSS = document.createElement("style"); +mailgoCSS.id = "mailgo-style"; +mailgoCSS.type = "text/css"; +let mailgoCSSContent = document.createTextNode(`MAILGO_STYLE`); +mailgoCSS.appendChild(mailgoCSSContent); +document.head.appendChild(mailgoCSS); + /** * mailgoInit * the function that creates the mailgo elements in DOM