regenbogenkarte/main.ts
nachtjasmin b15bfc0a73 feat: add goatcounter integration
To enable the goatcounter integration, the variable
VITE_QUEER_LEXIKON_PRIVATE must be set to "true". This check is
intentionally added for development environments so that all dev
environments from possible forks do not modify the statistics by
accident.
2022-09-08 17:10:49 +02:00

20 lines
595 B
TypeScript

import "./main.css";
import { initializeForms } from "./ts/form";
import { setupHamburger } from "./ts/hamburger";
import { initializeMap } from "./ts/map";
import "@fontsource/ubuntu/latin.css";
import { setupLegend } from "./ts/legend";
import { setupEmergencyButton } from "./ts/emergency-button";
import { addGoatCounter } from "./ts/goatcounter";
document.addEventListener("DOMContentLoaded", () => {
initializeMap();
initializeForms();
setupHamburger();
setupLegend();
setupEmergencyButton();
if (import.meta.env.VITE_QUEER_LEXIKON_PRIVATE === "true") {
addGoatCounter();
}
});