From ccbb7d58a045b5a5604c34470666d95bc87258d7 Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Wed, 7 Feb 2024 16:04:30 +1100 Subject: [PATCH] fix: education perfect causes memory leak in some cases --- src/SEQTA.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SEQTA.ts b/src/SEQTA.ts index 212ad8e4..165b53f3 100644 --- a/src/SEQTA.ts +++ b/src/SEQTA.ts @@ -48,11 +48,13 @@ var MenuItemMutation = false var NonSEQTAPage = false 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') + document.addEventListener( 'load', async function () { CheckForMenuList() - const hasSEQTAText = document.childNodes[1].textContent?.includes('Copyright (c) SEQTA Software') const hasSEQTATitle = document.title.includes('SEQTA Learn') if (hasSEQTAText && hasSEQTATitle && !IsSEQTAPage) {