mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
refactor: Optimize element search and remove unused code in SEQTA.ts and injected.scss
This commit is contained in:
+9
-2
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user