feat: add global theme toggle

This commit is contained in:
SethBurkart123
2025-03-30 08:49:13 +11:00
parent 6147e96cc9
commit 3ecd7205ed
14 changed files with 145 additions and 141 deletions
@@ -1,24 +0,0 @@
export function enableNotificationCollector() {
var xhr3 = new XMLHttpRequest()
xhr3.open("POST", `${location.origin}/seqta/student/heartbeat?`, true)
xhr3.setRequestHeader("Content-Type", "application/json; charset=utf-8")
xhr3.onreadystatechange = function () {
if (xhr3.readyState === 4) {
var Notifications = JSON.parse(xhr3.response)
var alertdiv = document.getElementsByClassName(
"notifications__bubble___1EkSQ",
)[0]
if (typeof alertdiv == "undefined") {
console.info("[BetterSEQTA+] No notifications currently")
} else {
alertdiv.textContent = Notifications.payload.notifications.length
}
}
}
xhr3.send(
JSON.stringify({
timestamp: "1970-01-01 00:00:00.0",
hash: "#?page=/home",
}),
)
}