mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 11:44:40 +00:00
remove console logs
This commit is contained in:
@@ -30,10 +30,6 @@ import stringToHTML from './seqta/utils/stringToHTML'
|
|||||||
import { updateAllColors } from './seqta/ui/colors/Manager'
|
import { updateAllColors } from './seqta/ui/colors/Manager'
|
||||||
import { updateBgDurations } from './seqta/ui/Animation'
|
import { updateBgDurations } from './seqta/ui/Animation'
|
||||||
|
|
||||||
/* import injected from 'url:./css/injected.scss';
|
|
||||||
*/ /* import documentLoad from 'url:./css/documentload.scss'; */
|
|
||||||
|
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
chrome?: any
|
chrome?: any
|
||||||
@@ -66,19 +62,6 @@ document.addEventListener(
|
|||||||
import('./css/injected.scss')
|
import('./css/injected.scss')
|
||||||
import('./css/documentload.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()
|
enableCurrentTheme()
|
||||||
try {
|
try {
|
||||||
const items = await browser.storage.local.get() as SettingsState
|
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) {
|
if (document.body) {
|
||||||
observer.observe(document.body, {
|
observer.observe(document.body, {
|
||||||
childList: true,
|
childList: true,
|
||||||
subtree: true,
|
subtree: true,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 🚨 Fallback: Wait for the document to be ready
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
observer.observe(document.body, {
|
observer.observe(document.body, {
|
||||||
childList: true,
|
childList: true,
|
||||||
@@ -1578,8 +1559,6 @@ function CheckUnmarkedAttendance(lessonattendance: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function callHomeTimetable(date: string, change?: 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
|
// Creates a HTTP Post Request to the SEQTA page for the students timetable
|
||||||
var xhr = new XMLHttpRequest()
|
var xhr = new XMLHttpRequest()
|
||||||
xhr.open('POST', `${location.origin}/seqta/student/load/timetable?`, true)
|
xhr.open('POST', `${location.origin}/seqta/student/load/timetable?`, true)
|
||||||
@@ -1654,7 +1633,6 @@ function callHomeTimetable(date: string, change?: any) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log(DayContainer);
|
|
||||||
DayContainer.innerHTML = ''
|
DayContainer.innerHTML = ''
|
||||||
var dummyDay = document.createElement('div')
|
var dummyDay = document.createElement('div')
|
||||||
dummyDay.classList.add('day-empty')
|
dummyDay.classList.add('day-empty')
|
||||||
@@ -2213,7 +2191,6 @@ async function loadHomePage() {
|
|||||||
// Creates the root of the home page added to the main div
|
// Creates the root of the home page added to the main div
|
||||||
let homeContainer = stringToHTML('<div class="home-root"><div class="home-container" id="home-container"></div></div>')
|
let homeContainer = stringToHTML('<div class="home-root"><div class="home-container" id="home-container"></div></div>')
|
||||||
|
|
||||||
console.log(homeContainer?.firstChild!)
|
|
||||||
// Appends the html file to main div
|
// Appends the html file to main div
|
||||||
// Note: firstChild of html is done due to needing to grab the body from the stringToHTML function
|
// Note: firstChild of html is done due to needing to grab the body from the stringToHTML function
|
||||||
main.append(homeContainer?.firstChild!)
|
main.append(homeContainer?.firstChild!)
|
||||||
@@ -2221,8 +2198,6 @@ async function loadHomePage() {
|
|||||||
// Gets the current date
|
// Gets the current date
|
||||||
const date = new Date()
|
const date = new Date()
|
||||||
|
|
||||||
console.log(document.getElementById('main'))
|
|
||||||
|
|
||||||
// Creates the shortcut container into the home container
|
// Creates the shortcut container into the home container
|
||||||
const Shortcut = stringToHTML('<div class="shortcut-container border"><div class="shortcuts border" id="shortcuts"></div></div>')
|
const Shortcut = stringToHTML('<div class="shortcut-container border"><div class="shortcuts border" id="shortcuts"></div></div>')
|
||||||
// Appends the shortcut container into the home container
|
// Appends the shortcut container into the home container
|
||||||
|
|||||||
Reference in New Issue
Block a user