remove document listener for loading which sometimes caused failure to append

This commit is contained in:
SethBurkart123
2024-03-22 13:14:32 +11:00
parent ef07e41705
commit 15f1f793b3
+3 -6
View File
@@ -52,10 +52,9 @@ var IsSEQTAPage = false
// 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')
init()
document.addEventListener(
'load',
async function () {
async function init() {
CheckForMenuList()
const hasSEQTATitle = document.title.includes('SEQTA Learn')
@@ -92,9 +91,7 @@ document.addEventListener(
if (!hasSEQTAText && !NonSEQTAPage) {
NonSEQTAPage = true
}
},
true,
)
}
function SetDisplayNone(ElementName: string) {
return `li[data-key=${ElementName}]{display:var(--menuHidden) !important; transition: 1s;}`