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

Detect navigation instead of infinite setInterval() loop #551

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CatPieLeaf
Copy link
Contributor

@CatPieLeaf CatPieLeaf commented Jun 8, 2024

This PR replaces setInterval() with three event listeners for attempting to swap players only once the user navigates through the page, instead of throwing multiple attempts every second and causing performance issues.

@CatPieLeaf CatPieLeaf changed the title Detect navigation instead of Loop Interval Detect navigation instead of infinite setInterval() loop Jun 8, 2024
@CatPieLeaf CatPieLeaf force-pushed the main branch 2 times, most recently from 1019090 to b391d37 Compare June 8, 2024 20:32
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.

None yet

1 participant