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

"BetterStreamChat" menu option appears where it isn't supposed to #31

Open
sn-o-w opened this issue Aug 23, 2023 · 5 comments
Open

"BetterStreamChat" menu option appears where it isn't supposed to #31

sn-o-w opened this issue Aug 23, 2023 · 5 comments
Labels
bug Something isn't working YouTube

Comments

@sn-o-w
Copy link

sn-o-w commented Aug 23, 2023

Describe the bug
I see "BetterStreamChat" menu option after I click on a user in the chat.

To Reproduce
Click on the 3 dots on any user in any YouTube livestream chat.

Expected behavior
"BetterStreamChat" option to appear only after clicking 3 dots at the top of the screen.

Screenshots
Screenshot_22

Desktop:

  • Browser: Chrome Beta
  • Browser Version: 117.0.5938.11
  • Addon Version: 1.3.7
  • Platform: YouTube
@sn-o-w sn-o-w added the bug Something isn't working label Aug 23, 2023
@sn-o-w
Copy link
Author

sn-o-w commented Aug 23, 2023

@cyfung1031 Perhaps you have an idea how this could be fixed. 🤔

@sn-o-w
Copy link
Author

sn-o-w commented Aug 23, 2023

Having a small icon alongside the text "BetterStreamChat" would be nice. Maybe the extension's icon? It would require two versions (one for dark mode and one for light mode). The current extension's icon should be fine for YouTube's light mode. 🤔

@cyfung1031
Copy link
Contributor

cyfung1031 commented Aug 24, 2023

@cyfung1031 Perhaps you have an idea how this could be fixed. 🤔

3 options

  1. inject a script into the unisolated context (page context) to the check the menu data. if menu data is not the required one, ignore the addition of button
  2. add eventlistener to check whether it is really a click action on that three dots button. ('tap' or 'click')
  3. (the correct way) in unisolated context (page context), change the menu data of yt-live-chat-header-renderer, and monitor data change via _dataChanged

2nd option should be easier to do.
detected a tap / click action => add button

I don't have time to do a PR. You can try to implement by yourself.


what's 3rd option

3rd option is the only correct way to do, but it requires high level coding skills and knowledge. don't waste your time to go for it.

Screen Shot 2023-08-24 at 9 26 11

Conclusion:

go for 2nd option.
and use setInterval or mutationObserver to hide the button when the menu is hidden.

@sn-o-w
Copy link
Author

sn-o-w commented Aug 24, 2023

@cyfung1031 Perhaps you have an idea how this could be fixed. 🤔

3 options

  1. inject a script into the unisolated context (page context) to the check the menu data. if menu data is not the required one, ignore the addition of button
  2. add eventlistener to check whether it is really a click action on that three dots button. ('tap' or 'click')
  3. (the correct way) in unisolated context (page context), change the menu data of yt-live-chat-header-renderer, and monitor data change via _dataChanged

2nd option should be easier to do. detected a tap / click action => add button

I don't have time to do a PR. You can try to implement by yourself.

what's 3rd option

3rd option is the only correct way to do, but it requires high level coding skills and knowledge. don't waste your time to go for it.

Screen Shot 2023-08-24 at 9 26 11 # Conclusion: go for 2nd option. and use setInterval or mutationObserver to hide the button when the menu is hidden.

Have no idea how to implement any of these options. My coding skills aren't that great.

@derpierre65
Copy link
Owner

derpierre65 commented Aug 24, 2023

i can check it later, but i am very busy with other projects and work
maybe this weekend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working YouTube
Projects
None yet
Development

No branches or pull requests

3 participants