1
0
mirror of https://github.com/lancedikson/bowser synced 2025-12-05 06:02:14 +00:00

Add HarmonyOS detection support for OpenHarmony user-agents

Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-08-09 20:47:22 +00:00
parent 40f83dc913
commit 12f3ffd7b0
3 changed files with 27 additions and 0 deletions

View File

@ -107,6 +107,7 @@ export const OS_MAP = {
ChromeOS: 'Chrome OS', ChromeOS: 'Chrome OS',
PlayStation4: 'PlayStation 4', PlayStation4: 'PlayStation 4',
Roku: 'Roku', Roku: 'Roku',
HarmonyOS: 'HarmonyOS',
}; };
export const ENGINE_MAP = { export const ENGINE_MAP = {

View File

@ -87,6 +87,18 @@ export default [
}, },
}, },
/* HarmonyOS */
{
test: [/OpenHarmony/i],
describe(ua) {
const version = Utils.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i, ua);
return {
name: OS_MAP.HarmonyOS,
version,
};
},
},
/* Android */ /* Android */
{ {
test(parser) { test(parser) {

View File

@ -365,6 +365,20 @@
type: "mobile" type: "mobile"
engine: engine:
name: "Blink" name: "Blink"
-
ua: "Mozilla/5.0 (Phone; OpenHarmony 5.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 ArkWeb/4.1.6.1 Mobile HuaweiBrowser/5.1.5.352"
spec:
browser:
name: "Chrome"
version: "114.0.0.0"
os:
name: "HarmonyOS"
version: "5.0"
platform:
type: "mobile"
vendor: "Huawei"
engine:
name: "Blink"
Google Search: Google Search:
- -
ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 12_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/83.0.268992909 Mobile/15E148 Safari/605.1" ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 12_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/83.0.268992909 Mobile/15E148 Safari/605.1"