| <!DOCTYPE html> |
| |
| <!-- Copyright 2016 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. --> |
| |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <title>Test Request Desktop/Mobile Script</title> |
| </head> |
| <body> |
| <p id="userAgentResult"/> |
| <p id="platformResult"/> |
| <script type="text/javascript"> |
| var userAgent = ""; |
| if (navigator.appVersion.toLowerCase().indexOf("mobile") > -1) |
| userAgent = 'Mobile'; |
| else |
| userAgent = 'Desktop'; |
| document.getElementById("userAgentResult").innerHTML = userAgent; |
| |
| document.getElementById("platformResult").innerHTML = navigator.platform; |
| </script> |
| </body> |
| </html> |