faisalman / ua-parser-js

"Unmask Your Traffic" - UAParser.js: The Essential Web Development Tool for User-Agent Detection
https://uaparser.dev/
GNU Affero General Public License v3.0
9.28k stars 1.19k forks source link

Improve browser detection for Quark #737

Closed lj0812 closed 3 months ago

lj0812 commented 4 months ago

Prerequisites

Type of Change

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

lj0812 commented 3 months ago

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