This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script is:inline> | |
function runCookieChimp() { | |
var script = document.createElement("script"); | |
script.src = "http://localhost:3000/widget/K8ktWD.js"; | |
script.id = "cookiechimp-js"; | |
document.head.appendChild(script); | |
} | |
// for Astro JS. | |
// listen for other events for different frameworks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadGoogleFonts(fontFamily = 'Open Sans') { | |
const link = document.createElement('link'); | |
link.href = `https://fonts.googleapis.com/css2?family=${fontFamily.replace(/ /g, '+')}&display=swap`; | |
link.rel = 'stylesheet'; | |
document.head.appendChild(link); | |
} | |
function removeGoogleFonts() { | |
const existingLink = document.querySelector('link[href^="https://fonts.googleapis.com/"]'); | |
if (existingLink) { |
OlderNewer