Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init upon readystate interactive instead of complete #10

Merged
merged 2 commits into from
May 23, 2024

Conversation

mbergen
Copy link
Contributor

@mbergen mbergen commented May 23, 2024

Initializes the event handlers & local storage update as soon as document is interactive.
As proposed by R1ch: https://discord.com/channels/93055209017729024/372075546231832576/1242894633139437688

Only tested by letting a userscript execute the JS since i don't have a dev wiki.

resources/scripts/ext.networknotice.Notice.js Outdated Show resolved Hide resolved
resources/scripts/ext.networknotice.Notice.js Outdated Show resolved Hide resolved
@liquidely liquidely requested a review from FO-nTTaX May 23, 2024 11:00
@FO-nTTaX FO-nTTaX merged commit 73a1ebe into Liquipedia:master May 23, 2024
3 checks passed
@notr1ch
Copy link

notr1ch commented May 23, 2024

Wouldn't this double-initialize and add multiple event handlers?

@FO-nTTaX
Copy link
Member

Why would it double initialize? Array.includes() is not a loop, just checks if the value passed is in the array and goes in or stays out.

@FO-nTTaX
Copy link
Member

Ah nvm, I had a brainfart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants