Skip to content

Conversation

@tarun2684
Copy link

This PR updates the button placement logic for ImprovedTube buttons under the YouTube player.

  • Ensures buttons are appended after existing elements using appendChild.
  • Removes existing .improvedtube-player-button elements to prevent duplicates.
  • Improves compatibility across layout variations using updated container selectors.

Fixes alignment issues and improves UI consistency.

ImprovedTube added a commit that referenced this pull request Jul 27, 2025
@ImprovedTube
Copy link
Member

hi and thanks! @tarun2684
are you referring to the bug mentioned at #3021 (comment) ?

instead of editing improvedtubeYoutubeButtonsUnderPlayer you submitted a short extra definition of it?

(Will you finish this or document what's left to do?)
Thanks!

@ImprovedTube ImprovedTube marked this pull request as draft July 27, 2025 02:12
@tarun2684
Copy link
Author

Thanks for sharing these detailed logs and observations — this is super helpful!

From the stack trace and behavior you've described (especially the Uncaught TypeError: Cannot read properties of null (reading 'parentElement')), it seems like the YouTube player DOM may not be fully initialized when improvedtubeYoutubeButtonsUnderPlayer() tries to run.
I'll take a closer look at the error lines in appearance.js:505 and functions.js, and see if we can safely add checks for null or delay execution until the elements are available.
Really appreciate your help in tracking this down — I’ll follow up soon with a patch suggestion or a PR.

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.

2 participants