mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
remove document listener for loading which sometimes caused failure to append
This commit is contained in:
+3
-6
@@ -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)
|
// 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')
|
const hasSEQTAText = document.childNodes[1].textContent?.includes('Copyright (c) SEQTA Software')
|
||||||
|
init()
|
||||||
|
|
||||||
document.addEventListener(
|
async function init() {
|
||||||
'load',
|
|
||||||
async function () {
|
|
||||||
CheckForMenuList()
|
CheckForMenuList()
|
||||||
const hasSEQTATitle = document.title.includes('SEQTA Learn')
|
const hasSEQTATitle = document.title.includes('SEQTA Learn')
|
||||||
|
|
||||||
@@ -92,9 +91,7 @@ document.addEventListener(
|
|||||||
if (!hasSEQTAText && !NonSEQTAPage) {
|
if (!hasSEQTAText && !NonSEQTAPage) {
|
||||||
NonSEQTAPage = true
|
NonSEQTAPage = true
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
true,
|
|
||||||
)
|
|
||||||
|
|
||||||
function SetDisplayNone(ElementName: string) {
|
function SetDisplayNone(ElementName: string) {
|
||||||
return `li[data-key=${ElementName}]{display:var(--menuHidden) !important; transition: 1s;}`
|
return `li[data-key=${ElementName}]{display:var(--menuHidden) !important; transition: 1s;}`
|
||||||
|
|||||||
Reference in New Issue
Block a user