mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 11:44:40 +00:00
fix(PageDetection): SEQTA.ts throwing errors on html pages with less than 2 document childNodes
This commit is contained in:
+5
-2
@@ -46,10 +46,13 @@ let currentSelectedDate = new Date()
|
|||||||
let LessonInterval: any
|
let LessonInterval: any
|
||||||
|
|
||||||
var IsSEQTAPage = false
|
var IsSEQTAPage = false
|
||||||
|
let hasSEQTAText = false
|
||||||
|
|
||||||
// This check is placed outside of the document load event due to issues with EP (https://github.com/BetterSEQTA/BetterSEQTA-Plus/issues/84)
|
// This check is placed outside of the document load event due to issues with EP (https://github.com/BetterSEQTA/BetterSEQTA-Plus/issues/84)
|
||||||
const hasSEQTAText = document.childNodes[1].textContent?.includes('Copyright (c) SEQTA Software')
|
if (document.childNodes[1]) {
|
||||||
init()
|
hasSEQTAText = document.childNodes[1].textContent?.includes('Copyright (c) SEQTA Software') ?? false
|
||||||
|
init()
|
||||||
|
}
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
CheckForMenuList()
|
CheckForMenuList()
|
||||||
|
|||||||
Reference in New Issue
Block a user