css in js, gulp

This commit is contained in:
Matteo Manzinello
2019-05-02 21:32:30 +02:00
parent f017dfa686
commit edb2d43601
4 changed files with 5640 additions and 5 deletions

View File

@@ -1,3 +0,0 @@
.mailgo-container {
background: white;
}

View File

@@ -1,4 +1,14 @@
import "./mailgo.css";
// Your CSS as text
var styles = `
.mailgo-modal-container {
background: white;
}
`;
let styleSheet = document.createElement("style");
styleSheet.type = "text/css";
styleSheet.innerText = styles;
document.head.appendChild(styleSheet);
// ottengo tutti i mailto contenuti nella pagina
let mailgos = document.querySelectorAll('a[href^="mailto:"]:not(.no-mailgo)');