Skip to content

Commit 44165a6

Browse files
committed
Improve CPU detection: 68k
1 parent fc51250 commit 44165a6

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/main/ua-parser.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,8 @@
546546
/((ppc|powerpc)(64)?)( mac|;|\))/i, // PowerPC
547547
/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i // Alpha
548548
], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [
549+
/mc680.0/i
550+
], [[ARCHITECTURE, '68k']], [
549551
/winnt.+\[axp/i
550552
], [[ARCHITECTURE, 'alpha']]
551553
],

test/data/ua/cpu/cpu-all.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,15 @@
289289
},
290290
{
291291
"desc" : "68k",
292-
"ua" : "'Mozilla/1.1 (Macintosh; U; 68K)'",
292+
"ua" : "Mozilla/1.1 (Macintosh; U; 68K)",
293+
"expect" :
294+
{
295+
"architecture" : "68k"
296+
}
297+
},
298+
{
299+
"desc" : "MC680x0",
300+
"ua" : "AmigaVoyager/3.2 (AmigaOS/MC680x0)",
293301
"expect" :
294302
{
295303
"architecture" : "68k"

0 commit comments

Comments
 (0)