Skip to content

Commit

Permalink
Update UA for Ladybird Browser (previously SerenityOS Browser) (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
MacDue authored Feb 21, 2024
1 parent d00cd60 commit 8144b03
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
7 changes: 3 additions & 4 deletions regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1028,10 +1028,9 @@ user_agent_parsers:
# HTTrack crawler
- regex: '\b(HTTrack) (\d+)\.(\d+)(?:[\.\-](\d+)|)'

# SerenityOS (https://serenityos.org)
# https://github.com/SerenityOS/serenity/blob/2e1bbcb0faeae92d7595b8e0b022a8cdcecca07e/Userland/Libraries/LibWeb/Loader/ResourceLoader.h#L27
- regex: 'SerenityOS'
family_replacement: 'SerenityOS Browser'
# Ladybird Browser (https://ladybird.dev)
# https://github.com/SerenityOS/serenity/blob/8da9ff24e4e720b1e80a027f09c419ac9503f896/Userland/Libraries/LibWeb/Loader/ResourceLoader.h#L52
- regex: 'LibWeb\+LibJS\/\d+\.\d+ (Ladybird)\/(\d+)\.(\d+)'

# MullvadBrowser (https://mullvad.net/en/browser)
- regex: '(MullvadBrowser)/(\d+)(?:\.(\d+)|)(?:\.(\d+)|)'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_os.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3217,7 +3217,7 @@ test_cases:
patch:
patch_minor:

- user_agent_string: 'Mozilla/4.0 (SerenityOS; x86_64) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb'
- user_agent_string: 'Mozilla/5.0 (SerenityOS; x86_64) LibWeb+LibJS/1.0 Ladybird/1.0'
family: 'SerenityOS'
major:
minor:
Expand Down
8 changes: 4 additions & 4 deletions tests/test_ua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8664,10 +8664,10 @@ test_cases:
minor: '20'
patch: '1'

- user_agent_string: 'Mozilla/4.0 (SerenityOS; x86_64) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb'
family: 'SerenityOS Browser'
major:
minor:
- user_agent_string: 'Mozilla/5.0 (Linux; x86_64) LibWeb+LibJS/1.0 Ladybird/1.0'
family: 'Ladybird'
major: '1'
minor: '0'
patch:

- user_agent_string: 'surveyon/2.7.6 Mobile (Android: 11; MODEL:CPH2127; PRODUCT:CPH2127T2; MANUFACTURER:OPPO;)'
Expand Down

0 comments on commit 8144b03

Please sign in to comment.