From 8d54d27baa63ef07264c5101f568819f0545805d Mon Sep 17 00:00:00 2001 From: Anaru <98413596+FunnyEivske@users.noreply.github.com> Date: Mon, 24 Nov 2025 17:50:56 +0100 Subject: [PATCH] Fix import syntax for Firebase modules --- Script.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Script.js b/Script.js index 8713038..178b42e 100644 --- a/Script.js +++ b/Script.js @@ -1,6 +1,6 @@ -import { initializeApp } from "[https://www.gstatic.com/firebasejs/12.6.0/firebase-app.js](https://www.gstatic.com/firebasejs/12.6.0/firebase-app.js)"; -import { getAuth, onAuthStateChanged, signOut } from "[https://www.gstatic.com/firebasejs/12.6.0/firebase-auth.js](https://www.gstatic.com/firebasejs/12.6.0/firebase-auth.js)"; -import { getFirestore, collection, addDoc, updateDoc, doc, onSnapshot, query } from "[https://www.gstatic.com/firebasejs/12.6.0/firebase-firestore.js](https://www.gstatic.com/firebasejs/12.6.0/firebase-firestore.js)"; +import { initializeApp } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-app.js"; +import { getAuth, onAuthStateChanged, signOut } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-auth.js"; +import { getFirestore, collection, addDoc, updateDoc, doc, onSnapshot, query } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-firestore.js"; import { firebaseConfig } from "./config.js"; // Start @@ -40,6 +40,7 @@ function startDataListener() { onSnapshot(q, (snapshot) => { people = snapshot.docs.map(doc => ({ id: doc.id, ...doc.data() })); if (!focusPersonId && people.length > 0) { + // Prøver å finne "Eivind" eller "Meg" som startperson const me = people.find(p => p.name.toLowerCase().includes('eivind') || p.name.toLowerCase() === 'meg'); focusPersonId = me ? me.id : people[0].id; }