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 for Beta/Developer builds of Opera #1010

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Conversation

Jhanlon95
Copy link
Contributor

Regex would fail if using a Beta or Developer build of Opera as it couldn't get the version from the userAgent properly. This would result in the improved buttons for things such as banning, history, notes etc not loading.

UserAgent for Opera Developer: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/116.0.0.0 (Edition developer)"

The regex seemed to think that the version would have nothing after it, when it does it fails to match returning an empty array, it then tries to access that to get the browser version number which causes a failure.

I took the Regex from the Microsoft Edge case statement and that matches it fine. No idea why it stopped the History button and such from loading but it did as other parts of the extension would load. I have tested this on Opera Stable 114.0.5282.102, Opera Beta 115.0.5322.36 and Opera Developer 116.0.5335.0 and all 3 show no new errors when loading the locally built toolbox

…uldn't get the version from the userAgent properly
Copy link
Member

@eritbh eritbh left a comment

Choose a reason for hiding this comment

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

Thanks, this seems like a simple enough fix. I feel like there must be a more robust version for us to do version checks in general but I'm happy merging this

@eritbh eritbh added the bug something isn't working label Oct 31, 2024
@eritbh eritbh merged commit 0badab9 into toolbox-team:master Oct 31, 2024
2 checks passed
eritbh pushed a commit that referenced this pull request Oct 31, 2024
@eritbh
Copy link
Member

eritbh commented Oct 31, 2024

Also cherry-picked to backport/v6.1 as 95bb524 and released as 6.1.16.

@eritbh eritbh added this to the v6.1.16 milestone Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants