Priest of the Order of the Butterfly
Posts: 680 from 2009/10/21
From: Boston, USA
There are many way to show user agents (the easiest being to go to some site showing user agent), but if you want to see it in WebInspector,
you have to go to resource section and click any file, and you'll see the user agent header in the HTTP request.
_detectPlatformFlavor: function()
84 {
85 const userAgent = navigator.userAgent;
86
87 if (this.platform === "windows") {
88 var match = userAgent.match(/Windows NT (\d+)\.(?:\d+)/);
89 if (match && match[1] >= 6)
90 return WebInspector.PlatformFlavor.WindowsVista;
91 return null;
92 } else if (this.platform === "mac") {
93 var match = userAgent.match(/Mac OS X\s*(?:(\d+)_(\d+))?/);
94 if (!match || match[1] != 10)
95 return WebInspector.PlatformFlavor.MacSnowLeopard;
96 switch (Number(match[2])) {
97 case 4:
98 return WebInspector.PlatformFlavor.MacTiger;
99 case 5:
100 return WebInspector.PlatformFlavor.MacLeopard;
101 case 6:
102 default:
103 return WebInspector.PlatformFlavor.MacSnowLeopard;
104 }
Mac Mini 1.5GHz, 1G, 250G Drive, Apple Cinema Display, MorphOS 3.1 registered, MacOS 10 PowerBook (5,8) 1.67Hz, 2G, 80G Drive,........Waiting
PowerBook (5,8) 1.67Hz, 2G, 40G MorphOS 3.1 unregisterd