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

new auto confirm when paused #433

Merged
merged 3 commits into from
Oct 24, 2021
Merged

new auto confirm when paused #433

merged 3 commits into from
Oct 24, 2021

Conversation

Araxeus
Copy link
Collaborator

@Araxeus Araxeus commented Oct 15, 2021

Old one was was heavy on resources, listened to every movement, had issue with programmatically pausing, mediakeys, etc

this new way works in a very simple way - every 15min it refreshes the internal "last activity timer" (window._lact) of youtube, and as a result the "Continue Watching?" popup never appears

youtube-music/preload.js

Lines 50 to 51 in 831b1ea

// Blocks the "Are You Still There?" popup by setting the last active time to Date.now every 15min
setInterval(() => window._lact = Date.now(), 900000);

Fixes #415 and Fixes #364

notes:

  • this is not an optional plugin anymore since its so easy to do and I see no reason to ever disable it + plugin list is getting kinda long
  • deleted song-controls-front since it was originally created only because of the old yns_pause()

Copy link
Owner

@th-ch th-ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for this very cool improvement!

@th-ch th-ch merged commit 8b36139 into th-ch:master Oct 24, 2021
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.

Media Play/Pause Key not working The media key does not work very well and suddenly it does not work at all
2 participants