From e3b18e50b263cf3f2d568c0f93859f401c84fea1 Mon Sep 17 00:00:00 2001 From: Matteo Manzinello Date: Sun, 5 May 2019 21:46:11 +0200 Subject: [PATCH] spostato styles al caricamento del document --- src/mailgo.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/mailgo.js b/src/mailgo.js index 3f25b5b..46bab29 100644 --- a/src/mailgo.js +++ b/src/mailgo.js @@ -1,4 +1,8 @@ -let styles = ` +function mailgoInit() { + // ottengo tutti i mailto contenuti nella pagina + let mailgos = document.querySelectorAll('a[href^="mailto:"]:not(.no-mailgo)'); + + let styles = ` .mailgo-modal { all: initial; * { @@ -86,14 +90,8 @@ let styles = ` } .mailgo-weight-500 { font-weight: 500; - } -`; + }`; -function mailgoInit() { - // ottengo tutti i mailto contenuti nella pagina - let mailgos = document.querySelectorAll('a[href^="mailto:"]:not(.no-mailgo)'); - - // CSS let styleSheet = document.createElement("style"); styleSheet.type = "text/css"; styleSheet.innerText = styles;