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

Improve browser detection for Quark #737

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

lj0812
Copy link
Contributor

@lj0812 lj0812 commented Jul 10, 2024

Prerequisites

Type of Change

  • Feature

Description

This PR improves the detection of Quark browser. Currently, the library may not accurately identify Quark browser user agents. This change adds specific regex patterns for Quark browser and updates the browser detection logic to handle Quark user agents correctly. This improvement is necessary to ensure accurate browser identification for users.

Test

  1. Added a new test case in the test/specs/browser-all.json file specifically for Quark browser:
    {
      "desc"    : "Quark",
      "ua"      : "mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/112.0.0.0 safari/537.36 quarkpc/1.5.5.75",
      "expect"  :
      {
          "name"    : "Quark",
          "version" : "1.5.5.75",
          "major"   : "1"
      }
    }
  2. Ran the full test suite to ensure that the new Quark browser detection works correctly and doesn't introduce any regressions in existing functionality.
  3. Manually tested the parser with various Quark browser user agent strings to confirm accurate detection.
  4. Verified that the parser correctly identifies the Quark browser name, full version, and major version as specified in the test case.

Impact

This PR does not introduce any breaking changes. Existing users of UAParser.js should not need to make any changes to their code. The improvement simply enhances the library's ability to detect Quark browsers accurately.

Other Info

N/A

@faisalman faisalman changed the base branch from develop to master July 27, 2024 04:13
Copy link
Owner

@faisalman faisalman left a comment

Choose a reason for hiding this comment

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

Hi @lj0812 thanks for the PR, can you remove the build result files from the commit, and only include the relevant source files for a clear diff: ua-parser.js & browser-all.json

@lj0812
Copy link
Contributor Author

lj0812 commented Jul 29, 2024

Hi @lj0812 thanks for the PR, can you remove the build result files from the commit, and only include the relevant source files for a clear diff: ua-parser.js & browser-all.json

ok,done

@faisalman faisalman merged commit 15391d2 into faisalman:master Jul 31, 2024
3 of 5 checks passed
faisalman added a commit that referenced this pull request Sep 11, 2024
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