diff --git a/src/SEQTA.ts b/src/SEQTA.ts index 4b6d59dd..1692bdf6 100644 --- a/src/SEQTA.ts +++ b/src/SEQTA.ts @@ -30,10 +30,6 @@ import stringToHTML from './seqta/utils/stringToHTML' import { updateAllColors } from './seqta/ui/colors/Manager' import { updateBgDurations } from './seqta/ui/Animation' -/* import injected from 'url:./css/injected.scss'; - */ /* import documentLoad from 'url:./css/documentload.scss'; */ - - declare global { interface Window { chrome?: any @@ -66,19 +62,6 @@ document.addEventListener( import('./css/injected.scss') import('./css/documentload.scss') - /* const injectedCSS = document.createElement('link') - injectedCSS.setAttribute('rel', 'stylesheet') - injectedCSS.setAttribute('type', 'text/css') - injectedCSS.setAttribute('href', injected) */ - - /* const documentLoadCSS = document.createElement('link') - documentLoadCSS.setAttribute('rel', 'stylesheet') - documentLoadCSS.setAttribute('type', 'text/css') - documentLoadCSS.setAttribute('href', documentLoad) */ - - /* document.head.appendChild(documentLoadCSS) */ - /* document.head.appendChild(injectedCSS) */ - enableCurrentTheme() try { const items = await browser.storage.local.get() as SettingsState @@ -385,14 +368,12 @@ export function waitForElm(selector: string) { } }); - // 🛡️ Safety check: Ensure document.body is available if (document.body) { observer.observe(document.body, { childList: true, subtree: true, }); } else { - // 🚨 Fallback: Wait for the document to be ready document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, @@ -1578,8 +1559,6 @@ function CheckUnmarkedAttendance(lessonattendance: any) { } function callHomeTimetable(date: string, change?: any) { - const DayContainer = document.getElementById('day-container')! - console.log("Daycontainer: ", DayContainer) // Creates a HTTP Post Request to the SEQTA page for the students timetable var xhr = new XMLHttpRequest() xhr.open('POST', `${location.origin}/seqta/student/load/timetable?`, true) @@ -1654,7 +1633,6 @@ function callHomeTimetable(date: string, change?: any) { }) } } else { - console.log(DayContainer); DayContainer.innerHTML = '' var dummyDay = document.createElement('div') dummyDay.classList.add('day-empty') @@ -2213,7 +2191,6 @@ async function loadHomePage() { // Creates the root of the home page added to the main div let homeContainer = stringToHTML('