mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 11:44:40 +00:00
refactor: Remove unnecessary code in SEQTA.ts
This commit is contained in:
+4
-3
@@ -39,7 +39,6 @@ export let MenuOptionsOpen = false
|
|||||||
let currentSelectedDate = new Date()
|
let currentSelectedDate = new Date()
|
||||||
let LessonInterval: any
|
let LessonInterval: any
|
||||||
|
|
||||||
var MenuItemMutation = false
|
|
||||||
var NonSEQTAPage = false
|
var NonSEQTAPage = false
|
||||||
var IsSEQTAPage = false
|
var IsSEQTAPage = false
|
||||||
|
|
||||||
@@ -77,7 +76,7 @@ async function init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasSEQTAText && !NonSEQTAPage) {
|
if (!hasSEQTAText) {
|
||||||
NonSEQTAPage = true
|
NonSEQTAPage = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1447,7 +1446,7 @@ function callHomeTimetable(date: string, change?: any) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetUpcomingAssessments() {
|
async function GetUpcomingAssessments() {
|
||||||
let func = fetch(`${location.origin}/seqta/student/assessment/list/upcoming?`, {
|
let func = fetch(`${location.origin}/seqta/student/assessment/list/upcoming?`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@@ -2135,6 +2134,7 @@ export async function loadHomePage() {
|
|||||||
xhr2.onreadystatechange = function () {
|
xhr2.onreadystatechange = function () {
|
||||||
if (xhr2.readyState === 4) {
|
if (xhr2.readyState === 4) {
|
||||||
const NoticesPayload = JSON.parse(xhr2.response)
|
const NoticesPayload = JSON.parse(xhr2.response)
|
||||||
|
console.log(NoticesPayload)
|
||||||
const NoticeContainer = document.getElementById('notice-container')
|
const NoticeContainer = document.getElementById('notice-container')
|
||||||
if (NoticesPayload.payload.length === 0) {
|
if (NoticesPayload.payload.length === 0) {
|
||||||
if (!NoticeContainer!.innerText) {
|
if (!NoticeContainer!.innerText) {
|
||||||
@@ -2466,6 +2466,7 @@ export function SendNewsPage() {
|
|||||||
}, 8)
|
}, 8)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let MenuItemMutation = false
|
||||||
async function CheckForMenuList() {
|
async function CheckForMenuList() {
|
||||||
if (!MenuItemMutation) {
|
if (!MenuItemMutation) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user