Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

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

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