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

Fix/dynamic context menu #118

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

DanSM-5
Copy link
Contributor

@DanSM-5 DanSM-5 commented Feb 2, 2024

I did some test on my steam deck for #116 and I found the following error on brave browser:
image

It happens because on browser launch it will try to remove the ff2mpv context menu without it being added previously. However this didn't affect the browser to add the "Play in MPV" or "Profiles" context menu. I didn't observe any error in firefox but something similar may be happening.

I've wrapped the calls for browser.contextMenus.remove in a try/catch block to prevent any further issue.

Additionally I've wrapped the functions getProfiles and getOptions in try/catch blocks in case any of those caused an unexpected error.

Copy link
Owner

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

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

Weird. LGTM, although I'd love to understand why this would happen on some agents and not others (since I haven't seen it).

@woodruffw woodruffw merged commit da14247 into woodruffw:master Feb 2, 2024
8 checks passed
@woodruffw
Copy link
Owner

Thanks @DanSM-5!

@DanSM-5
Copy link
Contributor Author

DanSM-5 commented Feb 2, 2024

Weird. LGTM, although I'd love to understand why this would happen on some agents and not others (since I haven't seen it).

I can't say for sure. Maybe something to do in the way that browser-polyfill handles the apis in chromium.

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.

None yet

2 participants