Skip to content
This repository was archived by the owner on Dec 24, 2024. It is now read-only.

Detect navigation instead of infinite setInterval() loop#551

Open
CatPieLeaf wants to merge 2 commits intoTheRealJoelmatic:mainfrom
CatPieLeaf:detect
Open

Detect navigation instead of infinite setInterval() loop#551
CatPieLeaf wants to merge 2 commits intoTheRealJoelmatic:mainfrom
CatPieLeaf:detect

Conversation

@CatPieLeaf
Copy link
Copy Markdown
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
@CatPieLeaf CatPieLeaf force-pushed the main branch 4 times, most recently from ea63a3f to 913c133 Compare June 12, 2024 18:57
@eutudb23
Copy link
Copy Markdown

Thanks, this solved other issues as well.
Most of embedded videos didn't play with latest 5.6 version and this solution also fixes that issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants