-
-
Notifications
You must be signed in to change notification settings - Fork 557
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
Edit: Defining forbidFocus() once in advance, instead of inside features #2761
base: master
Are you sure you want to change the base?
Conversation
Fix code-charity#2754 `ImprovedTube.chapters` tries to call `ImprovedTube.forbidFocus` which does not exists or is not a function. Tested with Chromium on Arch Linuxand random youtube videos.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
hi @4yman-0, i appreciated your thoughts in the code. While defining a function for every user in every YouTube-tab is cheap,
however i undid this to undo the bug if you like, we should check why, going back to Dec21, https://github.com/code-charity/youtube/tree/HEAD@%7B2024-12-21%7D, typos? timing?/#2415 |
if (document.documentElement.dataset.pageType === 'video'
&& (ImprovedTube.storage.description === "expanded" || ImprovedTube.storage.transcript === true || ImprovedTube.storage.chapters === true )) { ImprovedTube.forbidFocus = function (ms) } I'll close the pull request if that's the case :) |
Great team-work! 👍🎉 |
Can you review? |
/why the now out-commented condition might not yet work at that point in the code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good To Me!
Fix #2754
ImprovedTube.chapters
tries to callImprovedTube.forbidFocus
which does not exists or is not a function. Tested with Chromium on Arch Linux and random youtube videos.