refactor: Optimize element search and remove unused code in SEQTA.ts and injected.scss

This commit is contained in:
sethburkart123
2024-06-19 22:28:15 +10:00
parent d21f8f0633
commit df5e644a94
4 changed files with 90 additions and 81 deletions
+9 -2
View File
@@ -700,7 +700,13 @@ export function tryLoad() {
updateIframesWithDarkMode()
// Waits for page to call on load, run scripts
removeThemeTagsFromNotices()
document.addEventListener(
'load',
function () {
removeThemeTagsFromNotices()
},
true,
)
}
function ChangeMenuItemPositions(storage: any) {
@@ -770,7 +776,7 @@ function main() {
}
const handleDisabled = () => {
waitForElm('.code').then(AppendElementsToDisabledPage)
waitForElm('.code', true, 50).then(AppendElementsToDisabledPage)
}
if (settingsState.onoff) {
@@ -789,6 +795,7 @@ function main() {
tryLoad()
} else {
handleDisabled()
window.addEventListener('load', handleDisabled)
}
}