forked from Jayphen/polyfill-useragent-normaliser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.json
198 lines (183 loc) · 7.49 KB
/
data.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
{
"//": "Regex to check for an already normalised user-agent",
"isNormalized": "/(?i)^(\\w+)\\/(\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?$/",
"//": "The lowest version of each browser which has >=0.1% of global usage according to https://caniuse.com/usage-table",
"baselineVersions": {
"edge": "*",
"edge_mob": "*",
"ie": "9",
"ie_mob": "11",
"chrome": "29",
"safari": "9",
"ios_saf": "9",
"ios_chr": "9",
"firefox": "38",
"firefox_mob": "38",
"android": "4.3",
"opera": "33",
"op_mob": "10",
"op_mini": "5",
"bb": "6",
"samsung_mob": "4"
},
"normalisations": [{
"reason": "Google Search iOS app should be detected as the underlying browser, which is safari on iOS",
"regex": "/(?i) GSA\\/[\\d.]+/"
},
{
"reason": "Instagram should be detected as the underlying browser, which is safari on ios",
"regex": "/(?i) Instagram [\\d.]+/"
},
{
"reason": "WebPageTest is not a real browser, remove the token to find the underlying browser",
"regex": "/(?i) PTST\\/[\\d.]+/"
},
{
"reason": "Waterfox is a Firefox fork, we can remove the Waterfox identifiers and parse the result as Firefox",
"regex": "/(?i) Waterfox\\/[\\d.]+/"
},
{
"reason": "Pale Moon has a Firefox-compat UA string, we can remove the Pale Moon and Goanna identifiers and parse the result as Firefox",
"regex": "/(?i) Goanna\\/[\\d.]+/"
},
{
"reason": "Pale Moon has a Firefox-compat UA string, we can remove the Pale Moon and Goanna identifiers and parse the result as Firefox",
"regex": "/(?i) PaleMoon\\/[\\d.]+/"
},
{
"reason": "Yandex browser is recognised by UA module but is actually Chromium under the hood, so better to remove the Yandex identifier and get the UA module to detect it as Chrome",
"regex": "/(YaBrowser)\\/(\\d+\\.)+\\d+ /"
},
{
"reason": "Crosswalk browser is recognised by UA module but is actually Chromium under the hood, so better to remove the identifier and get the UA module to detect it as Chrome",
"regex": "/(?i) (Crosswalk)\\/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)/"
},
{
"reason": "Chrome and Opera on iOS uses a UIWebView of the underlying platform to render content. By stripping the CriOS or OPiOS strings, the useragent parser will alias the user agent to ios_saf for the UIWebView, which is closer to the actual renderer",
"regex": "/((CriOS|OPiOS)\\/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)|(FxiOS\\/(\\d+)\\.(\\d+)))/"
},
{
"reason": "Vivaldi browser is recognised by UA module but is actually identical to Chrome, so the best way to get accurate targeting is to remove the vivaldi token from the UA",
"regex": "/(?i) vivaldi\\/[\\d.]+\\d+/"
},
{
"reason": "Facebook in-app browser `[FBAN/.....]` or `[FB_IAB/.....]` (see https://github.com/Financial-Times/polyfill-service/issues/990)",
"regex": "/(?i) \\[(FB_IAB|FBAN|FBIOS|FB4A)\\/[^\\]]+\\]/"
},
{
"reason": "Electron/X.Y.Z` (see https://github.com/Financial-Times/polyfill-service/issues/1129)",
"regex": "/(?i) Electron\\/[\\d.]+\\d+/"
},
{
"reason": "Chromium-based Edge",
"regex": "/(?i) Edg\\/[\\d.]+\\d+/"
},
{
"reason": "Modern mobile Googlebot which uses modern Chrome",
"regex": "/(?i)Safari.* Googlebot\\/2\\.1; \\+http:\\/\\/www\\.google\\.com\\/bot\\.html\\)/"
},
{
"reason": "Modern desktop Googlebot which uses modern Chrome",
"regex": "/(?i) Googlebot\\/2\\.1; \\+http:\\/\\/www\\.google\\.com\\/bot\\.html\\) /"
}
],
"//": "Aliases may be expressed in three formats:",
"//": "1. <detectedfamily>: <targetfamily>",
"//": "The browser family is renamed, version is maintained",
"//": "2. <detectedfamily>: [<targetfamily>, <targetmajor>, <targetminor>, <targetpatch>]",
"//": "The browser family is renamed and the version is set to the one specified",
"//": "3. <detectedfamily>: { <semver>: [<targetfamily>, <targetmajor>, <targetminor>, <targetpatch>], ... }",
"//": "Specific version ranges of this family are mapped to the specified browsers",
"aliases": {
"blackberry webkit": "bb",
"blackberry": "bb",
"pale moon (firefox variant)": "firefox",
"pale moon": "firefox",
"firefox mobile": "firefox_mob",
"firefox namoroka": "firefox",
"firefox shiretoko": "firefox",
"firefox minefield": "firefox",
"firefox alpha": "firefox",
"firefox beta": "firefox",
"microb": "firefox",
"mozilladeveloperpreview": "firefox",
"iceweasel": "firefox",
"opera tablet": "opera",
"opera mobile": "op_mob",
"opera mini": "op_mini",
"chrome mobile webview": "chrome",
"chrome mobile": "chrome",
"chrome frame": "chrome",
"chromium": "chrome",
"headlesschrome": "chrome",
"ie mobile": "ie_mob",
"ie large screen": "ie",
"internet explorer": "ie",
"edge mobile": "edge_mob",
"uc browser": {
"9.9": ["ie", 10]
},
"chrome mobile ios": "ios_chr",
"mobile safari": "ios_saf",
"iphone": "ios_saf",
"iphone simulator": "ios_saf",
"mobile safari uiwebview": "ios_saf",
"mobile safari ui/wkwebview": "ios_saf",
"mobile safari/wkwebview": "ios_saf",
"samsung internet": "samsung_mob",
"phantomjs": ["safari", 5],
"opera": {
"20": ["chrome", 33],
"21": ["chrome", 34],
"22": ["chrome", 35],
"23": ["chrome", 36],
"24": ["chrome", 37],
"25": ["chrome", 38],
"26": ["chrome", 39],
"27": ["chrome", 40],
"28": ["chrome", 41],
"29": ["chrome", 42],
"30": ["chrome", 43],
"31": ["chrome", 44],
"32": ["chrome", 45],
"33": ["chrome", 46],
"34": ["chrome", 47],
"35": ["chrome", 48],
"36": ["chrome", 49],
"37": ["chrome", 50],
"38": ["chrome", 51],
"39": ["chrome", 52],
"40": ["chrome", 53],
"41": ["chrome", 54],
"42": ["chrome", 55],
"43": ["chrome", 56],
"44": ["chrome", 57],
"45": ["chrome", 58],
"46": ["chrome", 59],
"47": ["chrome", 60],
"48": ["chrome", 61],
"49": ["chrome", 62],
"50": ["chrome", 63],
"51": ["chrome", 64],
"52": ["chrome", 65],
"53": ["chrome", 66],
"54": ["chrome", 67],
"55": ["chrome", 68],
"56": ["chrome", 69],
"57": ["chrome", 70],
"58": ["chrome", 71],
"59": ["chrome", 72],
"60": ["chrome", 73],
"61": ["chrome", 74],
"62": ["chrome", 75],
"63": ["chrome", 76],
"64": ["chrome", 77],
"65": ["chrome", 78],
"66": ["chrome", 79],
"67": ["chrome", 80]
},
"googlebot": {
"2.1": ["chrome", 41]
}
}
}